0.1.3 • Published 7 years ago
fpop v0.1.3
fpop
Floating Point OPerators.
Installation
yarn add fpopUsage
import * as fpop from 'fpop'
const a = 1
const b = 1.00000001
const c = 2
const d = 2.00000001
const e = 2.00000002
fpop.eq(a, b) // => true
fpop.eq(c, d, e) // => true
fpop.lt(a, b) // => false
fpop.gte(c, a) // => trueList of operators
Unary
isZeroisPositiveisNegative
Binary
eq2equalneqnot equallt2less thangt2greater thanlte2less than or equalgte2greater than or equal
N-ary
eqequalltless thangtgreater thanlteless than or equalgtegreater than or equalareZeroarePositiveareNegativeareSameSign