4.0.4 • Published 7 years ago

is-equal-enough v4.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

is-equal-enough

flipactual Travis Codecov Node NPM

Determine whether values are within a tolerance of each other

isEqualEnough(a, b, tolerance) ⇒ boolean

Determine whether two numbers are within a provided tolerance of each other.

Kind: global function
Returns: boolean - Whether the numbers are within the tolerance or not.

ParamTypeDefaultDescription
anumberA number
bnumberAnother number
tolerancenumberNumber.EPSILONThe acceptable tolerance.

Example

isEqualEnough(0.15 + 0.15, 0.1 + 0.2);
// → true

Scripts

test – run the tests

npm run test

coverage – generate and view code coverage as HTML

npm run coverage

lint – lint the codebase

npm run lint

readme – generate the README

npm run readme

compile – compile the code

npm run compile

License

MIT @ Flip

4.0.4

7 years ago

4.0.3

7 years ago

4.0.2

7 years ago

4.0.1

7 years ago

4.0.0

7 years ago

3.0.6

7 years ago

3.0.5

7 years ago

3.0.4

7 years ago

3.0.3

8 years ago

3.0.2

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago