# interval-subtract

> subtract an interval from another

Latest version **1.0.0** (published 2015-03-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install interval-subtract
pnpm add interval-subtract
yarn add interval-subtract
bun add interval-subtract
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-03-21 |
| First published | 2015-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Elijah Insua |
| Maintainers | tmpvar |
| Keywords | interval, subtract |

## Links

- npm: https://www.npmjs.com/package/interval-subtract
- Repository: https://github.com/tmpvar/interval-subtract
- Issues: https://github.com/tmpvar/interval-subtract/issues
- npm.io page: https://npm.io/package/interval-subtract

## Dependencies (1)

- [tape](https://npm.io/package/tape.md) ^3.5.0

## Recent versions

- 1.0.0 (latest) — 2015-03-21

## README

# interval-subtract

subtract an interval from another where an interval is a 2 part array

extracted from [Implicit Solid Modeling Using Interval Methods](http://jenchienjackchang.com/sample-page/implicit-solid-modeling-using-interval-methods/)

## install

`npm install interval-subtract`

## use 

```javascript
var isub = require('interval-subtract');

console.log(isub([1, 2], [3, 4]));
// output: [-3, -1]

console.log(isub([1, 2], [1, 2]));
// output: [0, 0]
```

### api signature

__isub__(`a`, `b`, `out`)

* `a` is the first interval
* `b` is the second interval
* `out` is an optional 2 part araray. Provide this to avoid generating garbage
* returns: 2 part array

## license 

[MIT](LICENSE.txt)

---
_Source: https://npm.io/package/interval-subtract · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
