Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

interval-subtract

1.0.0 • Public • Published

interval-subtract

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

extracted from Implicit Solid Modeling Using Interval Methods

install

npm install interval-subtract

use

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

install

npm i interval-subtract

Downloadsweekly downloads

4

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar