@nberlette/math 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +889 -0
- package/cjs/abs.d.ts +14 -0
- package/cjs/abs.d.ts.map +1 -0
- package/cjs/abs.js +22 -0
- package/cjs/abs.js.map +1 -0
- package/cjs/acos.d.ts +17 -0
- package/cjs/acos.d.ts.map +1 -0
- package/cjs/acos.js +27 -0
- package/cjs/acos.js.map +1 -0
- package/cjs/acosh.d.ts +11 -0
- package/cjs/acosh.d.ts.map +1 -0
- package/cjs/acosh.js +35 -0
- package/cjs/acosh.js.map +1 -0
- package/cjs/asin.d.ts +11 -0
- package/cjs/asin.d.ts.map +1 -0
- package/cjs/asin.js +28 -0
- package/cjs/asin.js.map +1 -0
- package/cjs/asinh.d.ts +9 -0
- package/cjs/asinh.d.ts.map +1 -0
- package/cjs/asinh.js +26 -0
- package/cjs/asinh.js.map +1 -0
- package/cjs/atan.d.ts +11 -0
- package/cjs/atan.d.ts.map +1 -0
- package/cjs/atan.js +65 -0
- package/cjs/atan.js.map +1 -0
- package/cjs/atan2.d.ts +12 -0
- package/cjs/atan2.d.ts.map +1 -0
- package/cjs/atan2.js +70 -0
- package/cjs/atan2.js.map +1 -0
- package/cjs/atanh.d.ts +11 -0
- package/cjs/atanh.d.ts.map +1 -0
- package/cjs/atanh.js +32 -0
- package/cjs/atanh.js.map +1 -0
- package/cjs/cbrt.d.ts +9 -0
- package/cjs/cbrt.d.ts.map +1 -0
- package/cjs/cbrt.js +26 -0
- package/cjs/cbrt.js.map +1 -0
- package/cjs/ceil.d.ts +15 -0
- package/cjs/ceil.d.ts.map +1 -0
- package/cjs/ceil.js +34 -0
- package/cjs/ceil.js.map +1 -0
- package/cjs/clamp.d.ts +15 -0
- package/cjs/clamp.d.ts.map +1 -0
- package/cjs/clamp.js +32 -0
- package/cjs/clamp.js.map +1 -0
- package/cjs/clz32.d.ts +20 -0
- package/cjs/clz32.d.ts.map +1 -0
- package/cjs/clz32.js +48 -0
- package/cjs/clz32.js.map +1 -0
- package/cjs/constants/e.d.ts +17 -0
- package/cjs/constants/e.d.ts.map +1 -0
- package/cjs/constants/e.js +19 -0
- package/cjs/constants/e.js.map +1 -0
- package/cjs/constants/epsilon.d.ts +24 -0
- package/cjs/constants/epsilon.d.ts.map +1 -0
- package/cjs/constants/epsilon.js +26 -0
- package/cjs/constants/epsilon.js.map +1 -0
- package/cjs/constants/index.d.ts +23 -0
- package/cjs/constants/index.d.ts.map +1 -0
- package/cjs/constants/index.js +39 -0
- package/cjs/constants/index.js.map +1 -0
- package/cjs/constants/infinity.d.ts +3 -0
- package/cjs/constants/infinity.d.ts.map +1 -0
- package/cjs/constants/infinity.js +19 -0
- package/cjs/constants/infinity.js.map +1 -0
- package/cjs/constants/ln10.d.ts +10 -0
- package/cjs/constants/ln10.d.ts.map +1 -0
- package/cjs/constants/ln10.js +12 -0
- package/cjs/constants/ln10.js.map +1 -0
- package/cjs/constants/ln2.d.ts +10 -0
- package/cjs/constants/ln2.d.ts.map +1 -0
- package/cjs/constants/ln2.js +12 -0
- package/cjs/constants/ln2.js.map +1 -0
- package/cjs/constants/log10e.d.ts +10 -0
- package/cjs/constants/log10e.d.ts.map +1 -0
- package/cjs/constants/log10e.js +12 -0
- package/cjs/constants/log10e.js.map +1 -0
- package/cjs/constants/log2e.d.ts +10 -0
- package/cjs/constants/log2e.d.ts.map +1 -0
- package/cjs/constants/log2e.js +12 -0
- package/cjs/constants/log2e.js.map +1 -0
- package/cjs/constants/max_safe_integer.d.ts +11 -0
- package/cjs/constants/max_safe_integer.d.ts.map +1 -0
- package/cjs/constants/max_safe_integer.js +13 -0
- package/cjs/constants/max_safe_integer.js.map +1 -0
- package/cjs/constants/max_value.d.ts +10 -0
- package/cjs/constants/max_value.d.ts.map +1 -0
- package/cjs/constants/max_value.js +12 -0
- package/cjs/constants/max_value.js.map +1 -0
- package/cjs/constants/min_safe_integer.d.ts +12 -0
- package/cjs/constants/min_safe_integer.d.ts.map +1 -0
- package/cjs/constants/min_safe_integer.js +14 -0
- package/cjs/constants/min_safe_integer.js.map +1 -0
- package/cjs/constants/min_value.d.ts +10 -0
- package/cjs/constants/min_value.d.ts.map +1 -0
- package/cjs/constants/min_value.js +12 -0
- package/cjs/constants/min_value.js.map +1 -0
- package/cjs/constants/nan.d.ts +47 -0
- package/cjs/constants/nan.d.ts.map +1 -0
- package/cjs/constants/nan.js +30 -0
- package/cjs/constants/nan.js.map +1 -0
- package/cjs/constants/negative_infinity.d.ts +28 -0
- package/cjs/constants/negative_infinity.d.ts.map +1 -0
- package/cjs/constants/negative_infinity.js +15 -0
- package/cjs/constants/negative_infinity.js.map +1 -0
- package/cjs/constants/negative_zero.d.ts +31 -0
- package/cjs/constants/negative_zero.d.ts.map +1 -0
- package/cjs/constants/negative_zero.js +21 -0
- package/cjs/constants/negative_zero.js.map +1 -0
- package/cjs/constants/pi.d.ts +10 -0
- package/cjs/constants/pi.d.ts.map +1 -0
- package/cjs/constants/pi.js +12 -0
- package/cjs/constants/pi.js.map +1 -0
- package/cjs/constants/positive_infinity.d.ts +29 -0
- package/cjs/constants/positive_infinity.d.ts.map +1 -0
- package/cjs/constants/positive_infinity.js +16 -0
- package/cjs/constants/positive_infinity.js.map +1 -0
- package/cjs/constants/positive_zero.d.ts +38 -0
- package/cjs/constants/positive_zero.d.ts.map +1 -0
- package/cjs/constants/positive_zero.js +36 -0
- package/cjs/constants/positive_zero.js.map +1 -0
- package/cjs/constants/sqrt1_2.d.ts +9 -0
- package/cjs/constants/sqrt1_2.d.ts.map +1 -0
- package/cjs/constants/sqrt1_2.js +11 -0
- package/cjs/constants/sqrt1_2.js.map +1 -0
- package/cjs/constants/sqrt2.d.ts +9 -0
- package/cjs/constants/sqrt2.d.ts.map +1 -0
- package/cjs/constants/sqrt2.js +11 -0
- package/cjs/constants/sqrt2.js.map +1 -0
- package/cjs/cos.d.ts +10 -0
- package/cjs/cos.d.ts.map +1 -0
- package/cjs/cos.js +32 -0
- package/cjs/cos.js.map +1 -0
- package/cjs/cosh.d.ts +10 -0
- package/cjs/cosh.d.ts.map +1 -0
- package/cjs/cosh.js +21 -0
- package/cjs/cosh.js.map +1 -0
- package/cjs/exp.d.ts +20 -0
- package/cjs/exp.d.ts.map +1 -0
- package/cjs/exp.js +48 -0
- package/cjs/exp.js.map +1 -0
- package/cjs/expm1.d.ts +11 -0
- package/cjs/expm1.d.ts.map +1 -0
- package/cjs/expm1.js +38 -0
- package/cjs/expm1.js.map +1 -0
- package/cjs/f16round.d.ts +24 -0
- package/cjs/f16round.d.ts.map +1 -0
- package/cjs/f16round.js +42 -0
- package/cjs/f16round.js.map +1 -0
- package/cjs/float16/constants.d.ts +97 -0
- package/cjs/float16/constants.d.ts.map +1 -0
- package/cjs/float16/constants.js +99 -0
- package/cjs/float16/constants.js.map +1 -0
- package/cjs/float16/decode.d.ts +40 -0
- package/cjs/float16/decode.d.ts.map +1 -0
- package/cjs/float16/decode.js +67 -0
- package/cjs/float16/decode.js.map +1 -0
- package/cjs/float16/encode.d.ts +67 -0
- package/cjs/float16/encode.d.ts.map +1 -0
- package/cjs/float16/encode.js +77 -0
- package/cjs/float16/encode.js.map +1 -0
- package/cjs/float16/guards.d.ts +22 -0
- package/cjs/float16/guards.d.ts.map +1 -0
- package/cjs/float16/guards.js +15 -0
- package/cjs/float16/guards.js.map +1 -0
- package/cjs/float16/index.d.ts +11 -0
- package/cjs/float16/index.d.ts.map +1 -0
- package/cjs/float16/index.js +27 -0
- package/cjs/float16/index.js.map +1 -0
- package/cjs/float16/round.d.ts +25 -0
- package/cjs/float16/round.d.ts.map +1 -0
- package/cjs/float16/round.js +46 -0
- package/cjs/float16/round.js.map +1 -0
- package/cjs/float32/constants.d.ts +96 -0
- package/cjs/float32/constants.d.ts.map +1 -0
- package/cjs/float32/constants.js +98 -0
- package/cjs/float32/constants.js.map +1 -0
- package/cjs/float32/decode.d.ts +38 -0
- package/cjs/float32/decode.d.ts.map +1 -0
- package/cjs/float32/decode.js +70 -0
- package/cjs/float32/decode.js.map +1 -0
- package/cjs/float32/encode.d.ts +50 -0
- package/cjs/float32/encode.d.ts.map +1 -0
- package/cjs/float32/encode.js +77 -0
- package/cjs/float32/encode.js.map +1 -0
- package/cjs/float32/guards.d.ts +37 -0
- package/cjs/float32/guards.d.ts.map +1 -0
- package/cjs/float32/guards.js +20 -0
- package/cjs/float32/guards.js.map +1 -0
- package/cjs/float32/index.d.ts +11 -0
- package/cjs/float32/index.d.ts.map +1 -0
- package/cjs/float32/index.js +27 -0
- package/cjs/float32/index.js.map +1 -0
- package/cjs/float32/round.d.ts +23 -0
- package/cjs/float32/round.d.ts.map +1 -0
- package/cjs/float32/round.js +36 -0
- package/cjs/float32/round.js.map +1 -0
- package/cjs/floor.d.ts +10 -0
- package/cjs/floor.d.ts.map +1 -0
- package/cjs/floor.js +32 -0
- package/cjs/floor.js.map +1 -0
- package/cjs/fround.d.ts +23 -0
- package/cjs/fround.d.ts.map +1 -0
- package/cjs/fround.js +35 -0
- package/cjs/fround.js.map +1 -0
- package/cjs/guards/finite.d.ts +23 -0
- package/cjs/guards/finite.d.ts.map +1 -0
- package/cjs/guards/finite.js +21 -0
- package/cjs/guards/finite.js.map +1 -0
- package/cjs/guards/index.d.ts +50 -0
- package/cjs/guards/index.d.ts.map +1 -0
- package/cjs/guards/index.js +66 -0
- package/cjs/guards/index.js.map +1 -0
- package/cjs/guards/infinity.d.ts +3 -0
- package/cjs/guards/infinity.d.ts.map +1 -0
- package/cjs/guards/infinity.js +19 -0
- package/cjs/guards/infinity.js.map +1 -0
- package/cjs/guards/integer.d.ts +47 -0
- package/cjs/guards/integer.d.ts.map +1 -0
- package/cjs/guards/integer.js +23 -0
- package/cjs/guards/integer.js.map +1 -0
- package/cjs/guards/nan.d.ts +61 -0
- package/cjs/guards/nan.d.ts.map +1 -0
- package/cjs/guards/nan.js +68 -0
- package/cjs/guards/nan.js.map +1 -0
- package/cjs/guards/negative_infinity.d.ts +19 -0
- package/cjs/guards/negative_infinity.d.ts.map +1 -0
- package/cjs/guards/negative_infinity.js +25 -0
- package/cjs/guards/negative_infinity.js.map +1 -0
- package/cjs/guards/negative_zero.d.ts +12 -0
- package/cjs/guards/negative_zero.d.ts.map +1 -0
- package/cjs/guards/negative_zero.js +24 -0
- package/cjs/guards/negative_zero.js.map +1 -0
- package/cjs/guards/positive_infinity.d.ts +19 -0
- package/cjs/guards/positive_infinity.d.ts.map +1 -0
- package/cjs/guards/positive_infinity.js +25 -0
- package/cjs/guards/positive_infinity.js.map +1 -0
- package/cjs/guards/positive_zero.d.ts +17 -0
- package/cjs/guards/positive_zero.d.ts.map +1 -0
- package/cjs/guards/positive_zero.js +36 -0
- package/cjs/guards/positive_zero.js.map +1 -0
- package/cjs/guards/safe_integer.d.ts +33 -0
- package/cjs/guards/safe_integer.d.ts.map +1 -0
- package/cjs/guards/safe_integer.js +27 -0
- package/cjs/guards/safe_integer.js.map +1 -0
- package/cjs/hypot.d.ts +18 -0
- package/cjs/hypot.d.ts.map +1 -0
- package/cjs/hypot.js +63 -0
- package/cjs/hypot.js.map +1 -0
- package/cjs/ieee754.d.ts +16 -0
- package/cjs/ieee754.d.ts.map +1 -0
- package/cjs/ieee754.js +32 -0
- package/cjs/ieee754.js.map +1 -0
- package/cjs/imul.d.ts +17 -0
- package/cjs/imul.d.ts.map +1 -0
- package/cjs/imul.js +24 -0
- package/cjs/imul.js.map +1 -0
- package/cjs/index.d.ts +84 -0
- package/cjs/index.d.ts.map +1 -0
- package/cjs/index.js +113 -0
- package/cjs/index.js.map +1 -0
- package/cjs/internal/ieee754.d.ts +174 -0
- package/cjs/internal/ieee754.d.ts.map +1 -0
- package/cjs/internal/ieee754.js +200 -0
- package/cjs/internal/ieee754.js.map +1 -0
- package/cjs/internal/primordials.d.ts +30 -0
- package/cjs/internal/primordials.d.ts.map +1 -0
- package/cjs/internal/primordials.js +30 -0
- package/cjs/internal/primordials.js.map +1 -0
- package/cjs/log.d.ts +9 -0
- package/cjs/log.d.ts.map +1 -0
- package/cjs/log.js +46 -0
- package/cjs/log.js.map +1 -0
- package/cjs/log10.d.ts +9 -0
- package/cjs/log10.d.ts.map +1 -0
- package/cjs/log10.js +21 -0
- package/cjs/log10.js.map +1 -0
- package/cjs/log1p.d.ts +10 -0
- package/cjs/log1p.d.ts.map +1 -0
- package/cjs/log1p.js +32 -0
- package/cjs/log1p.js.map +1 -0
- package/cjs/log2.d.ts +12 -0
- package/cjs/log2.d.ts.map +1 -0
- package/cjs/log2.js +24 -0
- package/cjs/log2.js.map +1 -0
- package/cjs/max.d.ts +22 -0
- package/cjs/max.d.ts.map +1 -0
- package/cjs/max.js +51 -0
- package/cjs/max.js.map +1 -0
- package/cjs/min.d.ts +10 -0
- package/cjs/min.d.ts.map +1 -0
- package/cjs/min.js +36 -0
- package/cjs/min.js.map +1 -0
- package/cjs/package.json +3 -0
- package/cjs/pow.d.ts +31 -0
- package/cjs/pow.d.ts.map +1 -0
- package/cjs/pow.js +36 -0
- package/cjs/pow.js.map +1 -0
- package/cjs/random.d.ts +93 -0
- package/cjs/random.d.ts.map +1 -0
- package/cjs/random.js +242 -0
- package/cjs/random.js.map +1 -0
- package/cjs/round.d.ts +9 -0
- package/cjs/round.d.ts.map +1 -0
- package/cjs/round.js +24 -0
- package/cjs/round.js.map +1 -0
- package/cjs/sign.d.ts +17 -0
- package/cjs/sign.d.ts.map +1 -0
- package/cjs/sign.js +22 -0
- package/cjs/sign.js.map +1 -0
- package/cjs/sin.d.ts +14 -0
- package/cjs/sin.d.ts.map +1 -0
- package/cjs/sin.js +31 -0
- package/cjs/sin.js.map +1 -0
- package/cjs/sinh.d.ts +14 -0
- package/cjs/sinh.d.ts.map +1 -0
- package/cjs/sinh.js +22 -0
- package/cjs/sinh.js.map +1 -0
- package/cjs/sqrt.d.ts +19 -0
- package/cjs/sqrt.d.ts.map +1 -0
- package/cjs/sqrt.js +45 -0
- package/cjs/sqrt.js.map +1 -0
- package/cjs/tan.d.ts +9 -0
- package/cjs/tan.d.ts.map +1 -0
- package/cjs/tan.js +26 -0
- package/cjs/tan.js.map +1 -0
- package/cjs/tanh.d.ts +17 -0
- package/cjs/tanh.d.ts.map +1 -0
- package/cjs/tanh.js +34 -0
- package/cjs/tanh.js.map +1 -0
- package/cjs/trunc.d.ts +21 -0
- package/cjs/trunc.d.ts.map +1 -0
- package/cjs/trunc.js +50 -0
- package/cjs/trunc.js.map +1 -0
- package/cjs/types/finite.d.ts +16 -0
- package/cjs/types/finite.d.ts.map +1 -0
- package/cjs/types/finite.js +4 -0
- package/cjs/types/finite.js.map +1 -0
- package/cjs/types/float.d.ts +65 -0
- package/cjs/types/float.d.ts.map +1 -0
- package/cjs/types/float.js +4 -0
- package/cjs/types/float.js.map +1 -0
- package/cjs/types/index.d.ts +6 -0
- package/cjs/types/index.d.ts.map +1 -0
- package/cjs/types/index.js +22 -0
- package/cjs/types/index.js.map +1 -0
- package/cjs/types/integer.d.ts +147 -0
- package/cjs/types/integer.d.ts.map +1 -0
- package/cjs/types/integer.js +5 -0
- package/cjs/types/integer.js.map +1 -0
- package/cjs/types/precision.d.ts +46 -0
- package/cjs/types/precision.d.ts.map +1 -0
- package/cjs/types/precision.js +9 -0
- package/cjs/types/precision.js.map +1 -0
- package/cjs/types/safe_integer.d.ts +17 -0
- package/cjs/types/safe_integer.d.ts.map +1 -0
- package/cjs/types/safe_integer.js +5 -0
- package/cjs/types/safe_integer.js.map +1 -0
- package/esm/abs.d.ts +14 -0
- package/esm/abs.d.ts.map +1 -0
- package/esm/abs.js +19 -0
- package/esm/abs.js.map +1 -0
- package/esm/acos.d.ts +17 -0
- package/esm/acos.d.ts.map +1 -0
- package/esm/acos.js +24 -0
- package/esm/acos.js.map +1 -0
- package/esm/acosh.d.ts +11 -0
- package/esm/acosh.d.ts.map +1 -0
- package/esm/acosh.js +32 -0
- package/esm/acosh.js.map +1 -0
- package/esm/asin.d.ts +11 -0
- package/esm/asin.d.ts.map +1 -0
- package/esm/asin.js +25 -0
- package/esm/asin.js.map +1 -0
- package/esm/asinh.d.ts +9 -0
- package/esm/asinh.d.ts.map +1 -0
- package/esm/asinh.js +23 -0
- package/esm/asinh.js.map +1 -0
- package/esm/atan.d.ts +11 -0
- package/esm/atan.d.ts.map +1 -0
- package/esm/atan.js +62 -0
- package/esm/atan.js.map +1 -0
- package/esm/atan2.d.ts +12 -0
- package/esm/atan2.d.ts.map +1 -0
- package/esm/atan2.js +67 -0
- package/esm/atan2.js.map +1 -0
- package/esm/atanh.d.ts +11 -0
- package/esm/atanh.d.ts.map +1 -0
- package/esm/atanh.js +29 -0
- package/esm/atanh.js.map +1 -0
- package/esm/cbrt.d.ts +9 -0
- package/esm/cbrt.d.ts.map +1 -0
- package/esm/cbrt.js +23 -0
- package/esm/cbrt.js.map +1 -0
- package/esm/ceil.d.ts +15 -0
- package/esm/ceil.d.ts.map +1 -0
- package/esm/ceil.js +31 -0
- package/esm/ceil.js.map +1 -0
- package/esm/clamp.d.ts +15 -0
- package/esm/clamp.d.ts.map +1 -0
- package/esm/clamp.js +29 -0
- package/esm/clamp.js.map +1 -0
- package/esm/clz32.d.ts +20 -0
- package/esm/clz32.d.ts.map +1 -0
- package/esm/clz32.js +45 -0
- package/esm/clz32.js.map +1 -0
- package/esm/constants/e.d.ts +17 -0
- package/esm/constants/e.d.ts.map +1 -0
- package/esm/constants/e.js +16 -0
- package/esm/constants/e.js.map +1 -0
- package/esm/constants/epsilon.d.ts +24 -0
- package/esm/constants/epsilon.d.ts.map +1 -0
- package/esm/constants/epsilon.js +23 -0
- package/esm/constants/epsilon.js.map +1 -0
- package/esm/constants/index.d.ts +23 -0
- package/esm/constants/index.d.ts.map +1 -0
- package/esm/constants/index.js +23 -0
- package/esm/constants/index.js.map +1 -0
- package/esm/constants/infinity.d.ts +3 -0
- package/esm/constants/infinity.d.ts.map +1 -0
- package/esm/constants/infinity.js +3 -0
- package/esm/constants/infinity.js.map +1 -0
- package/esm/constants/ln10.d.ts +10 -0
- package/esm/constants/ln10.d.ts.map +1 -0
- package/esm/constants/ln10.js +9 -0
- package/esm/constants/ln10.js.map +1 -0
- package/esm/constants/ln2.d.ts +10 -0
- package/esm/constants/ln2.d.ts.map +1 -0
- package/esm/constants/ln2.js +9 -0
- package/esm/constants/ln2.js.map +1 -0
- package/esm/constants/log10e.d.ts +10 -0
- package/esm/constants/log10e.d.ts.map +1 -0
- package/esm/constants/log10e.js +9 -0
- package/esm/constants/log10e.js.map +1 -0
- package/esm/constants/log2e.d.ts +10 -0
- package/esm/constants/log2e.d.ts.map +1 -0
- package/esm/constants/log2e.js +9 -0
- package/esm/constants/log2e.js.map +1 -0
- package/esm/constants/max_safe_integer.d.ts +11 -0
- package/esm/constants/max_safe_integer.d.ts.map +1 -0
- package/esm/constants/max_safe_integer.js +10 -0
- package/esm/constants/max_safe_integer.js.map +1 -0
- package/esm/constants/max_value.d.ts +10 -0
- package/esm/constants/max_value.d.ts.map +1 -0
- package/esm/constants/max_value.js +9 -0
- package/esm/constants/max_value.js.map +1 -0
- package/esm/constants/min_safe_integer.d.ts +12 -0
- package/esm/constants/min_safe_integer.d.ts.map +1 -0
- package/esm/constants/min_safe_integer.js +11 -0
- package/esm/constants/min_safe_integer.js.map +1 -0
- package/esm/constants/min_value.d.ts +10 -0
- package/esm/constants/min_value.d.ts.map +1 -0
- package/esm/constants/min_value.js +9 -0
- package/esm/constants/min_value.js.map +1 -0
- package/esm/constants/nan.d.ts +47 -0
- package/esm/constants/nan.d.ts.map +1 -0
- package/esm/constants/nan.js +27 -0
- package/esm/constants/nan.js.map +1 -0
- package/esm/constants/negative_infinity.d.ts +28 -0
- package/esm/constants/negative_infinity.d.ts.map +1 -0
- package/esm/constants/negative_infinity.js +12 -0
- package/esm/constants/negative_infinity.js.map +1 -0
- package/esm/constants/negative_zero.d.ts +31 -0
- package/esm/constants/negative_zero.d.ts.map +1 -0
- package/esm/constants/negative_zero.js +18 -0
- package/esm/constants/negative_zero.js.map +1 -0
- package/esm/constants/pi.d.ts +10 -0
- package/esm/constants/pi.d.ts.map +1 -0
- package/esm/constants/pi.js +9 -0
- package/esm/constants/pi.js.map +1 -0
- package/esm/constants/positive_infinity.d.ts +29 -0
- package/esm/constants/positive_infinity.d.ts.map +1 -0
- package/esm/constants/positive_infinity.js +13 -0
- package/esm/constants/positive_infinity.js.map +1 -0
- package/esm/constants/positive_zero.d.ts +38 -0
- package/esm/constants/positive_zero.d.ts.map +1 -0
- package/esm/constants/positive_zero.js +33 -0
- package/esm/constants/positive_zero.js.map +1 -0
- package/esm/constants/sqrt1_2.d.ts +9 -0
- package/esm/constants/sqrt1_2.d.ts.map +1 -0
- package/esm/constants/sqrt1_2.js +8 -0
- package/esm/constants/sqrt1_2.js.map +1 -0
- package/esm/constants/sqrt2.d.ts +9 -0
- package/esm/constants/sqrt2.d.ts.map +1 -0
- package/esm/constants/sqrt2.js +8 -0
- package/esm/constants/sqrt2.js.map +1 -0
- package/esm/cos.d.ts +10 -0
- package/esm/cos.d.ts.map +1 -0
- package/esm/cos.js +29 -0
- package/esm/cos.js.map +1 -0
- package/esm/cosh.d.ts +10 -0
- package/esm/cosh.d.ts.map +1 -0
- package/esm/cosh.js +18 -0
- package/esm/cosh.js.map +1 -0
- package/esm/exp.d.ts +20 -0
- package/esm/exp.d.ts.map +1 -0
- package/esm/exp.js +45 -0
- package/esm/exp.js.map +1 -0
- package/esm/expm1.d.ts +11 -0
- package/esm/expm1.d.ts.map +1 -0
- package/esm/expm1.js +35 -0
- package/esm/expm1.js.map +1 -0
- package/esm/f16round.d.ts +24 -0
- package/esm/f16round.d.ts.map +1 -0
- package/esm/f16round.js +39 -0
- package/esm/f16round.js.map +1 -0
- package/esm/float16/constants.d.ts +97 -0
- package/esm/float16/constants.d.ts.map +1 -0
- package/esm/float16/constants.js +96 -0
- package/esm/float16/constants.js.map +1 -0
- package/esm/float16/decode.d.ts +40 -0
- package/esm/float16/decode.d.ts.map +1 -0
- package/esm/float16/decode.js +61 -0
- package/esm/float16/decode.js.map +1 -0
- package/esm/float16/encode.d.ts +67 -0
- package/esm/float16/encode.d.ts.map +1 -0
- package/esm/float16/encode.js +71 -0
- package/esm/float16/encode.js.map +1 -0
- package/esm/float16/guards.d.ts +22 -0
- package/esm/float16/guards.d.ts.map +1 -0
- package/esm/float16/guards.js +12 -0
- package/esm/float16/guards.js.map +1 -0
- package/esm/float16/index.d.ts +11 -0
- package/esm/float16/index.d.ts.map +1 -0
- package/esm/float16/index.js +11 -0
- package/esm/float16/index.js.map +1 -0
- package/esm/float16/round.d.ts +25 -0
- package/esm/float16/round.d.ts.map +1 -0
- package/esm/float16/round.js +43 -0
- package/esm/float16/round.js.map +1 -0
- package/esm/float32/constants.d.ts +96 -0
- package/esm/float32/constants.d.ts.map +1 -0
- package/esm/float32/constants.js +95 -0
- package/esm/float32/constants.js.map +1 -0
- package/esm/float32/decode.d.ts +38 -0
- package/esm/float32/decode.d.ts.map +1 -0
- package/esm/float32/decode.js +64 -0
- package/esm/float32/decode.js.map +1 -0
- package/esm/float32/encode.d.ts +50 -0
- package/esm/float32/encode.d.ts.map +1 -0
- package/esm/float32/encode.js +71 -0
- package/esm/float32/encode.js.map +1 -0
- package/esm/float32/guards.d.ts +37 -0
- package/esm/float32/guards.d.ts.map +1 -0
- package/esm/float32/guards.js +16 -0
- package/esm/float32/guards.js.map +1 -0
- package/esm/float32/index.d.ts +11 -0
- package/esm/float32/index.d.ts.map +1 -0
- package/esm/float32/index.js +11 -0
- package/esm/float32/index.js.map +1 -0
- package/esm/float32/round.d.ts +23 -0
- package/esm/float32/round.d.ts.map +1 -0
- package/esm/float32/round.js +33 -0
- package/esm/float32/round.js.map +1 -0
- package/esm/floor.d.ts +10 -0
- package/esm/floor.d.ts.map +1 -0
- package/esm/floor.js +29 -0
- package/esm/floor.js.map +1 -0
- package/esm/fround.d.ts +23 -0
- package/esm/fround.d.ts.map +1 -0
- package/esm/fround.js +32 -0
- package/esm/fround.js.map +1 -0
- package/esm/guards/finite.d.ts +23 -0
- package/esm/guards/finite.d.ts.map +1 -0
- package/esm/guards/finite.js +18 -0
- package/esm/guards/finite.js.map +1 -0
- package/esm/guards/index.d.ts +50 -0
- package/esm/guards/index.d.ts.map +1 -0
- package/esm/guards/index.js +50 -0
- package/esm/guards/index.js.map +1 -0
- package/esm/guards/infinity.d.ts +3 -0
- package/esm/guards/infinity.d.ts.map +1 -0
- package/esm/guards/infinity.js +3 -0
- package/esm/guards/infinity.js.map +1 -0
- package/esm/guards/integer.d.ts +47 -0
- package/esm/guards/integer.d.ts.map +1 -0
- package/esm/guards/integer.js +19 -0
- package/esm/guards/integer.js.map +1 -0
- package/esm/guards/nan.d.ts +61 -0
- package/esm/guards/nan.d.ts.map +1 -0
- package/esm/guards/nan.js +63 -0
- package/esm/guards/nan.js.map +1 -0
- package/esm/guards/negative_infinity.d.ts +19 -0
- package/esm/guards/negative_infinity.d.ts.map +1 -0
- package/esm/guards/negative_infinity.js +21 -0
- package/esm/guards/negative_infinity.js.map +1 -0
- package/esm/guards/negative_zero.d.ts +12 -0
- package/esm/guards/negative_zero.d.ts.map +1 -0
- package/esm/guards/negative_zero.js +20 -0
- package/esm/guards/negative_zero.js.map +1 -0
- package/esm/guards/positive_infinity.d.ts +19 -0
- package/esm/guards/positive_infinity.d.ts.map +1 -0
- package/esm/guards/positive_infinity.js +21 -0
- package/esm/guards/positive_infinity.js.map +1 -0
- package/esm/guards/positive_zero.d.ts +17 -0
- package/esm/guards/positive_zero.d.ts.map +1 -0
- package/esm/guards/positive_zero.js +19 -0
- package/esm/guards/positive_zero.js.map +1 -0
- package/esm/guards/safe_integer.d.ts +33 -0
- package/esm/guards/safe_integer.d.ts.map +1 -0
- package/esm/guards/safe_integer.js +22 -0
- package/esm/guards/safe_integer.js.map +1 -0
- package/esm/hypot.d.ts +18 -0
- package/esm/hypot.d.ts.map +1 -0
- package/esm/hypot.js +60 -0
- package/esm/hypot.js.map +1 -0
- package/esm/ieee754.d.ts +16 -0
- package/esm/ieee754.d.ts.map +1 -0
- package/esm/ieee754.js +16 -0
- package/esm/ieee754.js.map +1 -0
- package/esm/imul.d.ts +17 -0
- package/esm/imul.d.ts.map +1 -0
- package/esm/imul.js +21 -0
- package/esm/imul.js.map +1 -0
- package/esm/index.d.ts +84 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +84 -0
- package/esm/index.js.map +1 -0
- package/esm/internal/ieee754.d.ts +174 -0
- package/esm/internal/ieee754.d.ts.map +1 -0
- package/esm/internal/ieee754.js +194 -0
- package/esm/internal/ieee754.js.map +1 -0
- package/esm/internal/primordials.d.ts +30 -0
- package/esm/internal/primordials.d.ts.map +1 -0
- package/esm/internal/primordials.js +27 -0
- package/esm/internal/primordials.js.map +1 -0
- package/esm/log.d.ts +9 -0
- package/esm/log.d.ts.map +1 -0
- package/esm/log.js +43 -0
- package/esm/log.js.map +1 -0
- package/esm/log10.d.ts +9 -0
- package/esm/log10.d.ts.map +1 -0
- package/esm/log10.js +18 -0
- package/esm/log10.js.map +1 -0
- package/esm/log1p.d.ts +10 -0
- package/esm/log1p.d.ts.map +1 -0
- package/esm/log1p.js +29 -0
- package/esm/log1p.js.map +1 -0
- package/esm/log2.d.ts +12 -0
- package/esm/log2.d.ts.map +1 -0
- package/esm/log2.js +21 -0
- package/esm/log2.js.map +1 -0
- package/esm/max.d.ts +22 -0
- package/esm/max.d.ts.map +1 -0
- package/esm/max.js +48 -0
- package/esm/max.js.map +1 -0
- package/esm/min.d.ts +10 -0
- package/esm/min.d.ts.map +1 -0
- package/esm/min.js +33 -0
- package/esm/min.js.map +1 -0
- package/esm/package.json +3 -0
- package/esm/pow.d.ts +31 -0
- package/esm/pow.d.ts.map +1 -0
- package/esm/pow.js +33 -0
- package/esm/pow.js.map +1 -0
- package/esm/random.d.ts +93 -0
- package/esm/random.d.ts.map +1 -0
- package/esm/random.js +237 -0
- package/esm/random.js.map +1 -0
- package/esm/round.d.ts +9 -0
- package/esm/round.d.ts.map +1 -0
- package/esm/round.js +21 -0
- package/esm/round.js.map +1 -0
- package/esm/sign.d.ts +17 -0
- package/esm/sign.d.ts.map +1 -0
- package/esm/sign.js +19 -0
- package/esm/sign.js.map +1 -0
- package/esm/sin.d.ts +14 -0
- package/esm/sin.d.ts.map +1 -0
- package/esm/sin.js +28 -0
- package/esm/sin.js.map +1 -0
- package/esm/sinh.d.ts +14 -0
- package/esm/sinh.d.ts.map +1 -0
- package/esm/sinh.js +19 -0
- package/esm/sinh.js.map +1 -0
- package/esm/sqrt.d.ts +19 -0
- package/esm/sqrt.d.ts.map +1 -0
- package/esm/sqrt.js +42 -0
- package/esm/sqrt.js.map +1 -0
- package/esm/tan.d.ts +9 -0
- package/esm/tan.d.ts.map +1 -0
- package/esm/tan.js +23 -0
- package/esm/tan.js.map +1 -0
- package/esm/tanh.d.ts +17 -0
- package/esm/tanh.d.ts.map +1 -0
- package/esm/tanh.js +31 -0
- package/esm/tanh.js.map +1 -0
- package/esm/trunc.d.ts +21 -0
- package/esm/trunc.d.ts.map +1 -0
- package/esm/trunc.js +47 -0
- package/esm/trunc.js.map +1 -0
- package/esm/types/finite.d.ts +16 -0
- package/esm/types/finite.d.ts.map +1 -0
- package/esm/types/finite.js +3 -0
- package/esm/types/finite.js.map +1 -0
- package/esm/types/float.d.ts +65 -0
- package/esm/types/float.d.ts.map +1 -0
- package/esm/types/float.js +3 -0
- package/esm/types/float.js.map +1 -0
- package/esm/types/index.d.ts +6 -0
- package/esm/types/index.d.ts.map +1 -0
- package/esm/types/index.js +6 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/integer.d.ts +147 -0
- package/esm/types/integer.d.ts.map +1 -0
- package/esm/types/integer.js +4 -0
- package/esm/types/integer.js.map +1 -0
- package/esm/types/precision.d.ts +46 -0
- package/esm/types/precision.d.ts.map +1 -0
- package/esm/types/precision.js +8 -0
- package/esm/types/precision.js.map +1 -0
- package/esm/types/safe_integer.d.ts +17 -0
- package/esm/types/safe_integer.d.ts.map +1 -0
- package/esm/types/safe_integer.js +4 -0
- package/esm/types/safe_integer.js.map +1 -0
- package/package.json +1834 -0
- package/src/abs.ts +18 -0
- package/src/acos.ts +24 -0
- package/src/acosh.ts +28 -0
- package/src/asin.ts +24 -0
- package/src/asinh.ts +21 -0
- package/src/atan.ts +64 -0
- package/src/atan2.ts +58 -0
- package/src/atanh.ts +26 -0
- package/src/cbrt.ts +22 -0
- package/src/ceil.ts +27 -0
- package/src/clamp.ts +29 -0
- package/src/clz32.ts +45 -0
- package/src/constants/e.ts +18 -0
- package/src/constants/epsilon.ts +25 -0
- package/src/constants/index.ts +22 -0
- package/src/constants/infinity.ts +2 -0
- package/src/constants/ln10.ts +9 -0
- package/src/constants/ln2.ts +9 -0
- package/src/constants/log10e.ts +9 -0
- package/src/constants/log2e.ts +9 -0
- package/src/constants/max_safe_integer.ts +10 -0
- package/src/constants/max_value.ts +9 -0
- package/src/constants/min_safe_integer.ts +11 -0
- package/src/constants/min_value.ts +9 -0
- package/src/constants/nan.ts +57 -0
- package/src/constants/negative_infinity.ts +28 -0
- package/src/constants/negative_zero.ts +34 -0
- package/src/constants/pi.ts +9 -0
- package/src/constants/positive_infinity.ts +30 -0
- package/src/constants/positive_zero.ts +41 -0
- package/src/constants/sqrt1_2.ts +8 -0
- package/src/constants/sqrt2.ts +8 -0
- package/src/cos.ts +29 -0
- package/src/cosh.ts +18 -0
- package/src/exp.ts +45 -0
- package/src/expm1.ts +31 -0
- package/src/f16round.ts +39 -0
- package/src/float16/constants.ts +106 -0
- package/src/float16/decode.ts +61 -0
- package/src/float16/encode.ts +72 -0
- package/src/float16/guards.ts +33 -0
- package/src/float16/index.ts +10 -0
- package/src/float16/round.ts +43 -0
- package/src/float32/constants.ts +105 -0
- package/src/float32/decode.ts +64 -0
- package/src/float32/encode.ts +71 -0
- package/src/float32/guards.ts +54 -0
- package/src/float32/index.ts +10 -0
- package/src/float32/round.ts +33 -0
- package/src/floor.ts +26 -0
- package/src/fround.ts +32 -0
- package/src/guards/finite.ts +45 -0
- package/src/guards/index.ts +49 -0
- package/src/guards/infinity.ts +2 -0
- package/src/guards/integer.ts +62 -0
- package/src/guards/nan.ts +65 -0
- package/src/guards/negative_infinity.ts +22 -0
- package/src/guards/negative_zero.ts +21 -0
- package/src/guards/positive_infinity.ts +22 -0
- package/src/guards/positive_zero.ts +19 -0
- package/src/guards/safe_integer.ts +56 -0
- package/src/hypot.ts +59 -0
- package/src/ieee754.ts +15 -0
- package/src/imul.ts +21 -0
- package/src/index.ts +84 -0
- package/src/internal/ieee754.ts +255 -0
- package/src/internal/primordials.ts +33 -0
- package/src/log.ts +42 -0
- package/src/log10.ts +18 -0
- package/src/log1p.ts +26 -0
- package/src/log2.ts +21 -0
- package/src/max.ts +46 -0
- package/src/min.ts +32 -0
- package/src/pow.ts +33 -0
- package/src/random.ts +241 -0
- package/src/round.ts +20 -0
- package/src/sign.ts +19 -0
- package/src/sin.ts +29 -0
- package/src/sinh.ts +19 -0
- package/src/sqrt.ts +40 -0
- package/src/tan.ts +22 -0
- package/src/tanh.ts +28 -0
- package/src/trunc.ts +44 -0
- package/src/types/finite.ts +23 -0
- package/src/types/float.ts +74 -0
- package/src/types/index.ts +5 -0
- package/src/types/integer.ts +167 -0
- package/src/types/precision.ts +51 -0
- package/src/types/safe_integer.ts +18 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the provided number is `-Infinity` (negative infinity), in a way
|
|
3
|
+
* that is immune to any global variable shadowing or reassignment.
|
|
4
|
+
*
|
|
5
|
+
* @module negative-infinity
|
|
6
|
+
*/
|
|
7
|
+
import { NEGATIVE_INFINITY } from "../constants/negative_infinity.js";
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the provided number is `-Infinity` (negative infinity), in a way
|
|
10
|
+
* that is immune to any global variable shadowing or reassignment.
|
|
11
|
+
*
|
|
12
|
+
* @param it The number to check for negative infinity.
|
|
13
|
+
* @returns `true` if the provided number is `-Infinity`, otherwise `false`.
|
|
14
|
+
* @category Guards
|
|
15
|
+
* @tags Negative Infinity
|
|
16
|
+
*/
|
|
17
|
+
export function isNegativeInfinity(it) {
|
|
18
|
+
return +it === NEGATIVE_INFINITY;
|
|
19
|
+
}
|
|
20
|
+
export { NEGATIVE_INFINITY };
|
|
21
|
+
//# sourceMappingURL=negative_infinity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"negative_infinity.js","sourceRoot":"","sources":["../../src/guards/negative_infinity.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,OAAO,CAAC,EAAE,KAAK,iBAAiB,CAAC;AACnC,CAAC;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NEGATIVE_ZERO } from "../constants/negative_zero.js";
|
|
2
|
+
/**
|
|
3
|
+
* Checks if the provided number is a negative zero.
|
|
4
|
+
*
|
|
5
|
+
* @param it The number to check for negative zero.
|
|
6
|
+
* @returns `true` if the provided number is `-0`, otherwise `false`.
|
|
7
|
+
* @category Guards
|
|
8
|
+
* @tags Negative Zero
|
|
9
|
+
*/
|
|
10
|
+
export declare function isNegativeZero(it: number): it is NEGATIVE_ZERO;
|
|
11
|
+
export { NEGATIVE_ZERO };
|
|
12
|
+
//# sourceMappingURL=negative_zero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"negative_zero.d.ts","sourceRoot":"","sources":["../../src/guards/negative_zero.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,aAAa,CAE9D;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the provided number is a negative zero.
|
|
3
|
+
*
|
|
4
|
+
* @module negative-zero
|
|
5
|
+
*/
|
|
6
|
+
import { isNegativeInfinity } from "./negative_infinity.js";
|
|
7
|
+
import { NEGATIVE_ZERO } from "../constants/negative_zero.js";
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the provided number is a negative zero.
|
|
10
|
+
*
|
|
11
|
+
* @param it The number to check for negative zero.
|
|
12
|
+
* @returns `true` if the provided number is `-0`, otherwise `false`.
|
|
13
|
+
* @category Guards
|
|
14
|
+
* @tags Negative Zero
|
|
15
|
+
*/
|
|
16
|
+
export function isNegativeZero(it) {
|
|
17
|
+
return (it = +it) === 0 && isNegativeInfinity(1 / it);
|
|
18
|
+
}
|
|
19
|
+
export { NEGATIVE_ZERO };
|
|
20
|
+
//# sourceMappingURL=negative_zero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"negative_zero.js","sourceRoot":"","sources":["../../src/guards/negative_zero.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,OAAO,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the provided number is `+Infinity` (positive infinity), in a way
|
|
3
|
+
* that is immune to any global variable shadowing or reassignment.
|
|
4
|
+
*
|
|
5
|
+
* @module positive-infinity
|
|
6
|
+
*/
|
|
7
|
+
import { POSITIVE_INFINITY } from "../constants/positive_infinity.js";
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the provided number is `+Infinity` (positive infinity), in a way
|
|
10
|
+
* that is immune to any global variable shadowing or reassignment.
|
|
11
|
+
*
|
|
12
|
+
* @param it The number to check for positive infinity.
|
|
13
|
+
* @returns `true` if the provided number is `+Infinity`, otherwise `false`.
|
|
14
|
+
* @category Guards
|
|
15
|
+
* @tags Positive Infinity
|
|
16
|
+
*/
|
|
17
|
+
export declare function isPositiveInfinity(it: number): it is POSITIVE_INFINITY;
|
|
18
|
+
export { POSITIVE_INFINITY };
|
|
19
|
+
//# sourceMappingURL=positive_infinity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"positive_infinity.d.ts","sourceRoot":"","sources":["../../src/guards/positive_infinity.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,iBAAiB,CAEtE;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the provided number is `+Infinity` (positive infinity), in a way
|
|
3
|
+
* that is immune to any global variable shadowing or reassignment.
|
|
4
|
+
*
|
|
5
|
+
* @module positive-infinity
|
|
6
|
+
*/
|
|
7
|
+
import { POSITIVE_INFINITY } from "../constants/positive_infinity.js";
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the provided number is `+Infinity` (positive infinity), in a way
|
|
10
|
+
* that is immune to any global variable shadowing or reassignment.
|
|
11
|
+
*
|
|
12
|
+
* @param it The number to check for positive infinity.
|
|
13
|
+
* @returns `true` if the provided number is `+Infinity`, otherwise `false`.
|
|
14
|
+
* @category Guards
|
|
15
|
+
* @tags Positive Infinity
|
|
16
|
+
*/
|
|
17
|
+
export function isPositiveInfinity(it) {
|
|
18
|
+
return +it === POSITIVE_INFINITY;
|
|
19
|
+
}
|
|
20
|
+
export { POSITIVE_INFINITY };
|
|
21
|
+
//# sourceMappingURL=positive_infinity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"positive_infinity.js","sourceRoot":"","sources":["../../src/guards/positive_infinity.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,OAAO,CAAC,EAAE,KAAK,iBAAiB,CAAC;AACnC,CAAC;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the provided number is exactly positive zero (`+0`). This is a
|
|
3
|
+
* stricter than `x === 0`, as it will return `false` for `-0`.
|
|
4
|
+
*
|
|
5
|
+
* @module positive-zero
|
|
6
|
+
*/
|
|
7
|
+
export * from "../constants/positive_zero.js";
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the provided number is a positive zero (`+0`).
|
|
10
|
+
*
|
|
11
|
+
* @param it The number to check.
|
|
12
|
+
* @returns `true` if the provided number is exactly `+0`, otherwise `false`.
|
|
13
|
+
* @category Guards
|
|
14
|
+
* @tags Positive Zero
|
|
15
|
+
*/
|
|
16
|
+
export declare function isPositiveZero(it: number): it is 0;
|
|
17
|
+
//# sourceMappingURL=positive_zero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"positive_zero.d.ts","sourceRoot":"","sources":["../../src/guards/positive_zero.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,+BAA+B,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,CAAC,CAElD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the provided number is exactly positive zero (`+0`). This is a
|
|
3
|
+
* stricter than `x === 0`, as it will return `false` for `-0`.
|
|
4
|
+
*
|
|
5
|
+
* @module positive-zero
|
|
6
|
+
*/
|
|
7
|
+
export * from "../constants/positive_zero.js";
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the provided number is a positive zero (`+0`).
|
|
10
|
+
*
|
|
11
|
+
* @param it The number to check.
|
|
12
|
+
* @returns `true` if the provided number is exactly `+0`, otherwise `false`.
|
|
13
|
+
* @category Guards
|
|
14
|
+
* @tags Positive Zero
|
|
15
|
+
*/
|
|
16
|
+
export function isPositiveZero(it) {
|
|
17
|
+
return (it = +it) === 0 && (1 / it) === (1 / 0);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=positive_zero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"positive_zero.js","sourceRoot":"","sources":["../../src/guards/positive_zero.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,+BAA+B,CAAC;AAE9C;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,OAAO,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MAX_SAFE_INTEGER } from "../constants/max_safe_integer.js";
|
|
2
|
+
import { MIN_SAFE_INTEGER } from "../constants/min_safe_integer.js";
|
|
3
|
+
import type { SafeInteger } from "../types/safe_integer.js";
|
|
4
|
+
/**
|
|
5
|
+
* Check if a value is a safe integer within the range of `MIN_SAFE_INTEGER`
|
|
6
|
+
* (`-2^53 + 1`) and `MAX_SAFE_INTEGER` (`2^53 - 1`).
|
|
7
|
+
*
|
|
8
|
+
* This is a dependency-free, performant implementation that is functionally-
|
|
9
|
+
* equivalent to the native `Number.isSafeInteger` function.
|
|
10
|
+
*
|
|
11
|
+
* Note: This guard **does not coerce its input to a number** beforehand. The
|
|
12
|
+
* value passed for `number` must already satisfy `typeof number === "number"`.
|
|
13
|
+
*
|
|
14
|
+
* @template {number} N The type of numeric value to check.
|
|
15
|
+
* @param number The value to check.
|
|
16
|
+
* @returns `true` if the value is a safe integer, `false` otherwise.
|
|
17
|
+
* @category Guards
|
|
18
|
+
* @tags Safe Integer
|
|
19
|
+
*/
|
|
20
|
+
export declare function isSafeInteger<N extends number>(number: N): number is SafeInteger<N>;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a value is a safe integer within the range of `MIN_SAFE_INTEGER`
|
|
23
|
+
* (`-2^53 + 1`) and `MAX_SAFE_INTEGER` (`2^53 - 1`).
|
|
24
|
+
*
|
|
25
|
+
* Note: This guard **does not coerce its input to a number** beforehand. The
|
|
26
|
+
* value passed for `number` must already satisfy `typeof number === "number"`.
|
|
27
|
+
*
|
|
28
|
+
* @param number The value to check.
|
|
29
|
+
* @returns `true` if the value is a safe integer, `false` otherwise.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isSafeInteger(number: number): number is SafeInteger;
|
|
32
|
+
export { MAX_SAFE_INTEGER, MIN_SAFE_INTEGER, type SafeInteger };
|
|
33
|
+
//# sourceMappingURL=safe_integer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe_integer.d.ts","sourceRoot":"","sources":["../../src/guards/safe_integer.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAC5C,MAAM,EAAE,CAAC,GACR,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAE5B;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,WAAW,CAAC;AAQrE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if a value is a safe integer within the range of `MIN_SAFE_INTEGER`
|
|
3
|
+
* (`-2^53 + 1`) and `MAX_SAFE_INTEGER` (`2^53 - 1`).
|
|
4
|
+
*
|
|
5
|
+
* This is a dependency-free, performant implementation that is functionally-
|
|
6
|
+
* equivalent to the native `Number.isSafeInteger` function.
|
|
7
|
+
*
|
|
8
|
+
* Note: This guard **does not coerce its input to a number** beforehand. The
|
|
9
|
+
* value passed for `number` must already satisfy `typeof number === "number"`.
|
|
10
|
+
*
|
|
11
|
+
* @module safe-integer
|
|
12
|
+
*/
|
|
13
|
+
import { isFinite } from "./finite.js";
|
|
14
|
+
import { MAX_SAFE_INTEGER } from "../constants/max_safe_integer.js";
|
|
15
|
+
import { MIN_SAFE_INTEGER } from "../constants/min_safe_integer.js";
|
|
16
|
+
/** @internal */
|
|
17
|
+
export function isSafeInteger(number) {
|
|
18
|
+
return typeof number === "number" && isFinite(number) && (number % 1) === 0 &&
|
|
19
|
+
number >= MIN_SAFE_INTEGER && number <= MAX_SAFE_INTEGER;
|
|
20
|
+
}
|
|
21
|
+
export { MAX_SAFE_INTEGER, MIN_SAFE_INTEGER };
|
|
22
|
+
//# sourceMappingURL=safe_integer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe_integer.js","sourceRoot":"","sources":["../../src/guards/safe_integer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAmCpE,gBAAgB;AAChB,MAAM,UAAU,aAAa,CAAC,MAAe;IAC3C,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC;QACzE,MAAM,IAAI,gBAAgB,IAAI,MAAM,IAAI,gBAAgB,CAAC;AAC7D,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAoB,CAAC"}
|
package/esm/hypot.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the hypotenuse value using the Pythagorean theorem, which is the
|
|
3
|
+
* sqrt of the sum of the squares of its arguments (`sqrt(a^2 + b^2 + ...)`).
|
|
4
|
+
* Avoids overflow or underflow errors.
|
|
5
|
+
*
|
|
6
|
+
* @param values The numbers to calculate the hypotenuse of.
|
|
7
|
+
* @returns The hypotenuse of the provided numbers (also known as the Euclidean
|
|
8
|
+
* distance or L² norm of the values).
|
|
9
|
+
* @category Trigonometry
|
|
10
|
+
* @tags hypotenuse, pythagorean, euclidean
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* hypot(3, 4); // 5
|
|
14
|
+
* hypot(5, 12); // 13
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function hypot(...values: number[]): number;
|
|
18
|
+
//# sourceMappingURL=hypot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hypot.d.ts","sourceRoot":"","sources":["../src/hypot.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CA8BjD"}
|
package/esm/hypot.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the hypotenuse value using the Pythagorean theorem, which is the
|
|
3
|
+
* sqrt of the sum of the squares of its arguments (`sqrt(a^2 + b^2 + ...`).
|
|
4
|
+
* Avoids overflow or underflow errors.
|
|
5
|
+
*
|
|
6
|
+
* **Note**: This equation is also known as the Euclidean distance or L² norm.
|
|
7
|
+
*
|
|
8
|
+
* @module hypot
|
|
9
|
+
*/
|
|
10
|
+
import { abs } from "./abs.js";
|
|
11
|
+
import { sqrt } from "./sqrt.js";
|
|
12
|
+
/**
|
|
13
|
+
* Calculates the hypotenuse value using the Pythagorean theorem, which is the
|
|
14
|
+
* sqrt of the sum of the squares of its arguments (`sqrt(a^2 + b^2 + ...)`).
|
|
15
|
+
* Avoids overflow or underflow errors.
|
|
16
|
+
*
|
|
17
|
+
* @param values The numbers to calculate the hypotenuse of.
|
|
18
|
+
* @returns The hypotenuse of the provided numbers (also known as the Euclidean
|
|
19
|
+
* distance or L² norm of the values).
|
|
20
|
+
* @category Trigonometry
|
|
21
|
+
* @tags hypotenuse, pythagorean, euclidean
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* hypot(3, 4); // 5
|
|
25
|
+
* hypot(5, 12); // 13
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export function hypot(...values) {
|
|
29
|
+
if (values.length === 0)
|
|
30
|
+
return 0;
|
|
31
|
+
let hasInfinity = false;
|
|
32
|
+
let hasNaN = false;
|
|
33
|
+
let maximum = 0;
|
|
34
|
+
for (const value of values) {
|
|
35
|
+
if (value !== value) {
|
|
36
|
+
hasNaN = true;
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
if (value === Infinity || value === -Infinity) {
|
|
40
|
+
hasInfinity = true;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const magnitude = abs(value);
|
|
44
|
+
if (magnitude > maximum)
|
|
45
|
+
maximum = magnitude;
|
|
46
|
+
}
|
|
47
|
+
if (hasInfinity)
|
|
48
|
+
return Infinity;
|
|
49
|
+
if (hasNaN)
|
|
50
|
+
return NaN;
|
|
51
|
+
if (maximum === 0)
|
|
52
|
+
return 0;
|
|
53
|
+
let sum = 0;
|
|
54
|
+
for (const value of values) {
|
|
55
|
+
const normalized = value / maximum;
|
|
56
|
+
sum += normalized * normalized;
|
|
57
|
+
}
|
|
58
|
+
return maximum * sqrt(sum);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=hypot.js.map
|
package/esm/hypot.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hypot.js","sourceRoot":"","sources":["../src/hypot.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,KAAK,CAAC,GAAG,MAAgB;IACvC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAClC,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;YACpB,MAAM,GAAG,IAAI,CAAC;YACd,SAAS;QACX,CAAC;QACD,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC9C,WAAW,GAAG,IAAI,CAAC;YACnB,SAAS;QACX,CAAC;QACD,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;QAC7B,IAAI,SAAS,GAAG,OAAO;YAAE,OAAO,GAAG,SAAS,CAAC;IAC/C,CAAC;IAED,IAAI,WAAW;QAAE,OAAO,QAAQ,CAAC;IACjC,IAAI,MAAM;QAAE,OAAO,GAAG,CAAC;IACvB,IAAI,OAAO,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAE5B,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC;QACnC,GAAG,IAAI,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,OAAO,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC"}
|
package/esm/ieee754.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IEEE 754 floating point number manipulation.
|
|
3
|
+
*
|
|
4
|
+
* This module provides functions for encoding, decoding, and rounding floating
|
|
5
|
+
* point numbers according to the IEEE 754 standard, for both 16-bit and 32-bit
|
|
6
|
+
* precision. For utilities specific to 16-bit (half-precision) floats, see the
|
|
7
|
+
* `float16` module. For 32-bit (single-precision), see the `float32` module.
|
|
8
|
+
*
|
|
9
|
+
* **Note**: The `float16` and `float32` modules are used under the hood by the
|
|
10
|
+
* `f16round` and `fround` functions, respectively.
|
|
11
|
+
*
|
|
12
|
+
* @module ieee754
|
|
13
|
+
*/
|
|
14
|
+
export * from "./float16/index.js";
|
|
15
|
+
export * from "./float32/index.js";
|
|
16
|
+
//# sourceMappingURL=ieee754.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ieee754.d.ts","sourceRoot":"","sources":["../src/ieee754.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
package/esm/ieee754.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IEEE 754 floating point number manipulation.
|
|
3
|
+
*
|
|
4
|
+
* This module provides functions for encoding, decoding, and rounding floating
|
|
5
|
+
* point numbers according to the IEEE 754 standard, for both 16-bit and 32-bit
|
|
6
|
+
* precision. For utilities specific to 16-bit (half-precision) floats, see the
|
|
7
|
+
* `float16` module. For 32-bit (single-precision), see the `float32` module.
|
|
8
|
+
*
|
|
9
|
+
* **Note**: The `float16` and `float32` modules are used under the hood by the
|
|
10
|
+
* `f16round` and `fround` functions, respectively.
|
|
11
|
+
*
|
|
12
|
+
* @module ieee754
|
|
13
|
+
*/
|
|
14
|
+
export * from "./float16/index.js";
|
|
15
|
+
export * from "./float32/index.js";
|
|
16
|
+
//# sourceMappingURL=ieee754.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ieee754.js","sourceRoot":"","sources":["../src/ieee754.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
package/esm/imul.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performs a 32-bit integer multiplication of two numbers (interpreted as
|
|
3
|
+
* 32-bit integers), returning a 32-bit result.
|
|
4
|
+
*
|
|
5
|
+
* @module imul
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Performs a 32-bit integer multiplication of two numbers (interpreted as
|
|
9
|
+
* 32-bit integers), returning a 32-bit result.
|
|
10
|
+
*
|
|
11
|
+
* @param a The first number (treated as a 32-bit integer).
|
|
12
|
+
* @param b The second number (treated as a 32-bit integer).
|
|
13
|
+
* @returns The result of multiplying the two numbers as 32-bit integers.
|
|
14
|
+
* @category Bitwise
|
|
15
|
+
*/
|
|
16
|
+
export declare function imul(a: number, b: number): number;
|
|
17
|
+
//# sourceMappingURL=imul.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imul.d.ts","sourceRoot":"","sources":["../src/imul.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAIjD"}
|
package/esm/imul.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performs a 32-bit integer multiplication of two numbers (interpreted as
|
|
3
|
+
* 32-bit integers), returning a 32-bit result.
|
|
4
|
+
*
|
|
5
|
+
* @module imul
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Performs a 32-bit integer multiplication of two numbers (interpreted as
|
|
9
|
+
* 32-bit integers), returning a 32-bit result.
|
|
10
|
+
*
|
|
11
|
+
* @param a The first number (treated as a 32-bit integer).
|
|
12
|
+
* @param b The second number (treated as a 32-bit integer).
|
|
13
|
+
* @returns The result of multiplying the two numbers as 32-bit integers.
|
|
14
|
+
* @category Bitwise
|
|
15
|
+
*/
|
|
16
|
+
export function imul(a, b) {
|
|
17
|
+
const ah = (a >>> 16) & 0xffff, al = a & 0xffff;
|
|
18
|
+
const bh = (b >>> 16) & 0xffff, bl = b & 0xffff;
|
|
19
|
+
return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)) | 0;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=imul.js.map
|
package/esm/imul.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imul.js","sourceRoot":"","sources":["../src/imul.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,IAAI,CAAC,CAAS,EAAE,CAAS;IACvC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,MAAM,EAAE,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC;IAChD,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,MAAM,EAAE,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC;IAChD,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAC/D,CAAC"}
|
package/esm/index.d.ts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* # `@nick/math`
|
|
3
|
+
*
|
|
4
|
+
* Standalone implementations of every native API in the `Math` namespace,
|
|
5
|
+
* written in pure TypeScript with zero external dependencies. Distributed as a
|
|
6
|
+
* collection of tree-shakeable submodules so you can pick and choose exactly
|
|
7
|
+
* what features to include based on your specific use case's requirements.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import math from "@nick/math";
|
|
12
|
+
* import assert from "node:assert";
|
|
13
|
+
*
|
|
14
|
+
* // all the same constants from globalThis.Math
|
|
15
|
+
* assert.strictEqual(math.PI, Math.PI);
|
|
16
|
+
* assert.strictEqual(math.E, Math.E);
|
|
17
|
+
* assert.strictEqual(math.SQRT1_2, Math.SQRT1_2);
|
|
18
|
+
* assert.strictEqual(math.LOG10E, Math.LOG10E);
|
|
19
|
+
*
|
|
20
|
+
* // ...and even those from globalThis.Number
|
|
21
|
+
* assert.strictEqual(math.EPSILON, Number.EPSILON);
|
|
22
|
+
* assert.strictEqual(math.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);
|
|
23
|
+
* assert.strictEqual(math.NaN, Number.NaN);
|
|
24
|
+
* // ...
|
|
25
|
+
* assert.strictEqual(math.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);
|
|
26
|
+
*
|
|
27
|
+
* // all the functions from globalThis.Math
|
|
28
|
+
* assert.strictEqual(math.abs(-math.PI), math.PI);
|
|
29
|
+
* assert.strictEqual(math.f16round(math.PI), Math.f16round(Math.PI));
|
|
30
|
+
* // ...
|
|
31
|
+
* assert.strictEqual(math.cos(0.99999999999999), Math.cos(0.99999999999999));
|
|
32
|
+
*
|
|
33
|
+
* // additional, non-standard guards
|
|
34
|
+
* assert.ok(math.isNegativeInfinity(-1 / 0));
|
|
35
|
+
* assert.ok(math.isNegativeZero(-0));
|
|
36
|
+
* assert.ok(math.isPositiveZero(0));
|
|
37
|
+
* // ...
|
|
38
|
+
* assert.ok(math.isFinite(420));
|
|
39
|
+
* ```
|
|
40
|
+
* @module math
|
|
41
|
+
*/
|
|
42
|
+
export * from "./abs.js";
|
|
43
|
+
export * from "./acos.js";
|
|
44
|
+
export * from "./acosh.js";
|
|
45
|
+
export * from "./asin.js";
|
|
46
|
+
export * from "./asinh.js";
|
|
47
|
+
export * from "./atan.js";
|
|
48
|
+
export * from "./atanh.js";
|
|
49
|
+
export * from "./atan2.js";
|
|
50
|
+
export * from "./cbrt.js";
|
|
51
|
+
export * from "./ceil.js";
|
|
52
|
+
export * from "./clamp.js";
|
|
53
|
+
export * from "./clz32.js";
|
|
54
|
+
export * from "./constants/index.js";
|
|
55
|
+
export * from "./cos.js";
|
|
56
|
+
export * from "./cosh.js";
|
|
57
|
+
export * from "./exp.js";
|
|
58
|
+
export * from "./expm1.js";
|
|
59
|
+
export * from "./floor.js";
|
|
60
|
+
export * from "./f16round.js";
|
|
61
|
+
export * from "./fround.js";
|
|
62
|
+
export * from "./guards/index.js";
|
|
63
|
+
export * from "./hypot.js";
|
|
64
|
+
export * from "./ieee754.js";
|
|
65
|
+
export * from "./imul.js";
|
|
66
|
+
export * from "./log.js";
|
|
67
|
+
export * from "./log1p.js";
|
|
68
|
+
export * from "./log2.js";
|
|
69
|
+
export * from "./log10.js";
|
|
70
|
+
export * from "./max.js";
|
|
71
|
+
export * from "./min.js";
|
|
72
|
+
export * from "./pow.js";
|
|
73
|
+
export * from "./random.js";
|
|
74
|
+
export * from "./round.js";
|
|
75
|
+
export * from "./sign.js";
|
|
76
|
+
export * from "./sin.js";
|
|
77
|
+
export * from "./sinh.js";
|
|
78
|
+
export * from "./sqrt.js";
|
|
79
|
+
export * from "./tan.js";
|
|
80
|
+
export * from "./tanh.js";
|
|
81
|
+
export * from "./trunc.js";
|
|
82
|
+
export * from "./types/index.js";
|
|
83
|
+
export * as default from "./index.js";
|
|
84
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AAEjC,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC"}
|
package/esm/index.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* # `@nick/math`
|
|
3
|
+
*
|
|
4
|
+
* Standalone implementations of every native API in the `Math` namespace,
|
|
5
|
+
* written in pure TypeScript with zero external dependencies. Distributed as a
|
|
6
|
+
* collection of tree-shakeable submodules so you can pick and choose exactly
|
|
7
|
+
* what features to include based on your specific use case's requirements.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import math from "@nick/math";
|
|
12
|
+
* import assert from "node:assert";
|
|
13
|
+
*
|
|
14
|
+
* // all the same constants from globalThis.Math
|
|
15
|
+
* assert.strictEqual(math.PI, Math.PI);
|
|
16
|
+
* assert.strictEqual(math.E, Math.E);
|
|
17
|
+
* assert.strictEqual(math.SQRT1_2, Math.SQRT1_2);
|
|
18
|
+
* assert.strictEqual(math.LOG10E, Math.LOG10E);
|
|
19
|
+
*
|
|
20
|
+
* // ...and even those from globalThis.Number
|
|
21
|
+
* assert.strictEqual(math.EPSILON, Number.EPSILON);
|
|
22
|
+
* assert.strictEqual(math.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);
|
|
23
|
+
* assert.strictEqual(math.NaN, Number.NaN);
|
|
24
|
+
* // ...
|
|
25
|
+
* assert.strictEqual(math.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);
|
|
26
|
+
*
|
|
27
|
+
* // all the functions from globalThis.Math
|
|
28
|
+
* assert.strictEqual(math.abs(-math.PI), math.PI);
|
|
29
|
+
* assert.strictEqual(math.f16round(math.PI), Math.f16round(Math.PI));
|
|
30
|
+
* // ...
|
|
31
|
+
* assert.strictEqual(math.cos(0.99999999999999), Math.cos(0.99999999999999));
|
|
32
|
+
*
|
|
33
|
+
* // additional, non-standard guards
|
|
34
|
+
* assert.ok(math.isNegativeInfinity(-1 / 0));
|
|
35
|
+
* assert.ok(math.isNegativeZero(-0));
|
|
36
|
+
* assert.ok(math.isPositiveZero(0));
|
|
37
|
+
* // ...
|
|
38
|
+
* assert.ok(math.isFinite(420));
|
|
39
|
+
* ```
|
|
40
|
+
* @module math
|
|
41
|
+
*/
|
|
42
|
+
export * from "./abs.js";
|
|
43
|
+
export * from "./acos.js";
|
|
44
|
+
export * from "./acosh.js";
|
|
45
|
+
export * from "./asin.js";
|
|
46
|
+
export * from "./asinh.js";
|
|
47
|
+
export * from "./atan.js";
|
|
48
|
+
export * from "./atanh.js";
|
|
49
|
+
export * from "./atan2.js";
|
|
50
|
+
export * from "./cbrt.js";
|
|
51
|
+
export * from "./ceil.js";
|
|
52
|
+
export * from "./clamp.js";
|
|
53
|
+
export * from "./clz32.js";
|
|
54
|
+
export * from "./constants/index.js";
|
|
55
|
+
export * from "./cos.js";
|
|
56
|
+
export * from "./cosh.js";
|
|
57
|
+
export * from "./exp.js";
|
|
58
|
+
export * from "./expm1.js";
|
|
59
|
+
export * from "./floor.js";
|
|
60
|
+
export * from "./f16round.js";
|
|
61
|
+
export * from "./fround.js";
|
|
62
|
+
export * from "./guards/index.js";
|
|
63
|
+
export * from "./hypot.js";
|
|
64
|
+
export * from "./ieee754.js";
|
|
65
|
+
export * from "./imul.js";
|
|
66
|
+
export * from "./log.js";
|
|
67
|
+
export * from "./log1p.js";
|
|
68
|
+
export * from "./log2.js";
|
|
69
|
+
export * from "./log10.js";
|
|
70
|
+
export * from "./max.js";
|
|
71
|
+
export * from "./min.js";
|
|
72
|
+
export * from "./pow.js";
|
|
73
|
+
export * from "./random.js";
|
|
74
|
+
export * from "./round.js";
|
|
75
|
+
export * from "./sign.js";
|
|
76
|
+
export * from "./sin.js";
|
|
77
|
+
export * from "./sinh.js";
|
|
78
|
+
export * from "./sqrt.js";
|
|
79
|
+
export * from "./tan.js";
|
|
80
|
+
export * from "./tanh.js";
|
|
81
|
+
export * from "./trunc.js";
|
|
82
|
+
export * from "./types/index.js";
|
|
83
|
+
export * as default from "./index.js";
|
|
84
|
+
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AAEjC,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC"}
|