@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
package/esm/atan2.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the arctangent of the quotient of its arguments, `y / x`,
|
|
3
|
+
* returning a value in the range `(-π, π]`.
|
|
4
|
+
*
|
|
5
|
+
* @module atan2
|
|
6
|
+
*/
|
|
7
|
+
import { NAN } from "./constants/nan.js";
|
|
8
|
+
import { PI } from "./constants/pi.js";
|
|
9
|
+
import { atan } from "./atan.js";
|
|
10
|
+
import { isNaN } from "./guards/nan.js";
|
|
11
|
+
import { isNegativeZero } from "./guards/negative_zero.js";
|
|
12
|
+
import { isNegativeInfinity } from "./guards/negative_infinity.js";
|
|
13
|
+
import { isPositiveInfinity } from "./guards/positive_infinity.js";
|
|
14
|
+
const PI_OVER_2 = PI / 2, PI_OVER_4 = PI / 4;
|
|
15
|
+
/**
|
|
16
|
+
* Calculates the arctangent of the quotient of its arguments, `y / x`,
|
|
17
|
+
* returning a value in the range `(-π, π]`.
|
|
18
|
+
*
|
|
19
|
+
* @param y The ordinate coordinate.
|
|
20
|
+
* @param x The abscissa coordinate.
|
|
21
|
+
* @returns The angle between the positive x-axis and point (x, y), in radians.
|
|
22
|
+
* @category Trigonometry
|
|
23
|
+
* @tags angle, arctangent
|
|
24
|
+
*/
|
|
25
|
+
export function atan2(y, x) {
|
|
26
|
+
// fast paths for special cases
|
|
27
|
+
if (isNaN(y) || isNaN(x))
|
|
28
|
+
return NAN;
|
|
29
|
+
if (y === 0 && x === 0) {
|
|
30
|
+
if (isNegativeZero(y) && isNegativeZero(x))
|
|
31
|
+
return -PI;
|
|
32
|
+
if (isNegativeZero(y))
|
|
33
|
+
return -0;
|
|
34
|
+
if (isNegativeZero(x))
|
|
35
|
+
return PI;
|
|
36
|
+
return 0;
|
|
37
|
+
}
|
|
38
|
+
if (x === 0) {
|
|
39
|
+
if (y > 0)
|
|
40
|
+
return PI_OVER_2;
|
|
41
|
+
if (y < 0)
|
|
42
|
+
return -PI_OVER_2;
|
|
43
|
+
return NAN; // unreachable
|
|
44
|
+
}
|
|
45
|
+
// x (and possibly y) is infinity/-infinity
|
|
46
|
+
if (isPositiveInfinity(x)) {
|
|
47
|
+
if (isPositiveInfinity(y))
|
|
48
|
+
return PI_OVER_4;
|
|
49
|
+
if (isNegativeInfinity(y))
|
|
50
|
+
return -PI_OVER_4;
|
|
51
|
+
return y < 0 || isNegativeZero(y) ? -0 : 0;
|
|
52
|
+
}
|
|
53
|
+
else if (isNegativeInfinity(x)) {
|
|
54
|
+
if (isPositiveInfinity(y))
|
|
55
|
+
return 3 * PI_OVER_4;
|
|
56
|
+
if (isNegativeInfinity(y))
|
|
57
|
+
return -3 * PI_OVER_4;
|
|
58
|
+
return y < 0 || isNegativeZero(y) ? -PI : PI;
|
|
59
|
+
}
|
|
60
|
+
if (x > 0)
|
|
61
|
+
return atan(y / x);
|
|
62
|
+
if (x < 0)
|
|
63
|
+
return atan(y / x) + (y < 0 || isNegativeZero(y) ? -PI : PI);
|
|
64
|
+
// deno-coverage-ignore
|
|
65
|
+
return NAN; // this should never happen
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=atan2.js.map
|
package/esm/atan2.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atan2.js","sourceRoot":"","sources":["../src/atan2.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,MAAM,SAAS,GAAG,EAAE,GAAG,CAAC,EAAE,SAAS,GAAG,EAAE,GAAG,CAAC,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,UAAU,KAAK,CAAC,CAAS,EAAE,CAAS;IACxC,+BAA+B;IAC/B,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;QAAE,OAAO,GAAG,CAAC;IACrC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACvB,IAAI,cAAc,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,EAAE,CAAC;QACvD,IAAI,cAAc,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAC,CAAC;QACjC,IAAI,cAAc,CAAC,CAAC,CAAC;YAAE,OAAO,EAAE,CAAC;QACjC,OAAO,CAAC,CAAC;IACX,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACZ,IAAI,CAAC,GAAG,CAAC;YAAE,OAAO,SAAS,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC;YAAE,OAAO,CAAC,SAAS,CAAC;QAC7B,OAAO,GAAG,CAAC,CAAC,cAAc;IAC5B,CAAC;IAED,2CAA2C;IAC3C,IAAI,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1B,IAAI,kBAAkB,CAAC,CAAC,CAAC;YAAE,OAAO,SAAS,CAAC;QAC5C,IAAI,kBAAkB,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,SAAS,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;SAAM,IAAI,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;QACjC,IAAI,kBAAkB,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,GAAG,SAAS,CAAC;QAChD,IAAI,kBAAkB,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/C,CAAC;IAED,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAExE,uBAAuB;IACvB,OAAO,GAAG,CAAC,CAAC,2BAA2B;AACzC,CAAC"}
|
package/esm/atanh.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the inverse hyperbolic tangent of a number, returning a value in
|
|
3
|
+
* the range `[-∞, +∞]`.
|
|
4
|
+
*
|
|
5
|
+
* @param x The number whose inverse hyperbolic tangent is to be calculated
|
|
6
|
+
* (must be between -1 and 1).
|
|
7
|
+
* @returns The inverse hyperbolic tangent of the provided number.
|
|
8
|
+
* @category Trigonometry
|
|
9
|
+
*/
|
|
10
|
+
export declare function atanh(x: number): number;
|
|
11
|
+
//# sourceMappingURL=atanh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atanh.d.ts","sourceRoot":"","sources":["../src/atanh.ts"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAMvC"}
|
package/esm/atanh.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the inverse hyperbolic tangent of a number, returning a value in
|
|
3
|
+
* the range `[-∞, +∞]`.
|
|
4
|
+
*
|
|
5
|
+
* @module atanh
|
|
6
|
+
*/
|
|
7
|
+
import { isNaN, NAN } from "./guards/nan.js";
|
|
8
|
+
import { POSITIVE_INFINITY } from "./constants/positive_infinity.js";
|
|
9
|
+
import { log1p } from "./log1p.js";
|
|
10
|
+
/**
|
|
11
|
+
* Calculates the inverse hyperbolic tangent of a number, returning a value in
|
|
12
|
+
* the range `[-∞, +∞]`.
|
|
13
|
+
*
|
|
14
|
+
* @param x The number whose inverse hyperbolic tangent is to be calculated
|
|
15
|
+
* (must be between -1 and 1).
|
|
16
|
+
* @returns The inverse hyperbolic tangent of the provided number.
|
|
17
|
+
* @category Trigonometry
|
|
18
|
+
*/
|
|
19
|
+
export function atanh(x) {
|
|
20
|
+
if (isNaN(x) || x < -1 || x > 1)
|
|
21
|
+
return NAN;
|
|
22
|
+
if (x === -1 || x === 1)
|
|
23
|
+
return x * POSITIVE_INFINITY;
|
|
24
|
+
if (x === 0)
|
|
25
|
+
return x;
|
|
26
|
+
// Use log1p for better precision near 0 and to match native behavior.
|
|
27
|
+
return 0.5 * log1p((2 * x) / (1 - x));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=atanh.js.map
|
package/esm/atanh.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atanh.js","sourceRoot":"","sources":["../src/atanh.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC;;;;;;;;GAQG;AACH,MAAM,UAAU,KAAK,CAAC,CAAS;IAC7B,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IAC5C,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,GAAG,iBAAiB,CAAC;IACtD,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,sEAAsE;IACtE,OAAO,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACxC,CAAC"}
|
package/esm/cbrt.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the cube root of a number, handling negative values as well.
|
|
3
|
+
*
|
|
4
|
+
* @param x The number whose cube root is to be calculated.
|
|
5
|
+
* @returns The cube root of the provided number.
|
|
6
|
+
* @category Arithmetic
|
|
7
|
+
*/
|
|
8
|
+
export declare function cbrt(x: number): number;
|
|
9
|
+
//# sourceMappingURL=cbrt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cbrt.d.ts","sourceRoot":"","sources":["../src/cbrt.ts"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAKtC"}
|
package/esm/cbrt.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the cube root of a number, handling negative values as well.
|
|
3
|
+
*
|
|
4
|
+
* @module cbrt
|
|
5
|
+
*/
|
|
6
|
+
import { abs } from "./abs.js";
|
|
7
|
+
import { exp } from "./exp.js";
|
|
8
|
+
import { log } from "./log.js";
|
|
9
|
+
/**
|
|
10
|
+
* Calculates the cube root of a number, handling negative values as well.
|
|
11
|
+
*
|
|
12
|
+
* @param x The number whose cube root is to be calculated.
|
|
13
|
+
* @returns The cube root of the provided number.
|
|
14
|
+
* @category Arithmetic
|
|
15
|
+
*/
|
|
16
|
+
export function cbrt(x) {
|
|
17
|
+
if (x === 0)
|
|
18
|
+
return x;
|
|
19
|
+
const absX = abs(x);
|
|
20
|
+
const result = exp(log(absX) / 3);
|
|
21
|
+
return x < 0 ? -result : result;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=cbrt.js.map
|
package/esm/cbrt.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cbrt.js","sourceRoot":"","sources":["../src/cbrt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,UAAU,IAAI,CAAC,CAAS;IAC5B,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACpB,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;AAClC,CAAC"}
|
package/esm/ceil.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performant local implementation of the `Math.ceil` function.
|
|
3
|
+
*
|
|
4
|
+
* @module ceil
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Performant local implementation of the `Math.ceil` function.
|
|
8
|
+
*
|
|
9
|
+
* @param x The number to round up to the nearest whole number
|
|
10
|
+
* @returns The smallest integer greater than or equal to the provided number.
|
|
11
|
+
* @category Rounding
|
|
12
|
+
* @tags rounding, ceiling
|
|
13
|
+
*/
|
|
14
|
+
export declare function ceil(x: number): number;
|
|
15
|
+
//# sourceMappingURL=ceil.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ceil.d.ts","sourceRoot":"","sources":["../src/ceil.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAStC"}
|
package/esm/ceil.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performant local implementation of the `Math.ceil` function.
|
|
3
|
+
*
|
|
4
|
+
* @module ceil
|
|
5
|
+
*/
|
|
6
|
+
import { NEGATIVE_INFINITY } from "./constants/negative_infinity.js";
|
|
7
|
+
import { POSITIVE_INFINITY } from "./constants/positive_infinity.js";
|
|
8
|
+
/**
|
|
9
|
+
* Performant local implementation of the `Math.ceil` function.
|
|
10
|
+
*
|
|
11
|
+
* @param x The number to round up to the nearest whole number
|
|
12
|
+
* @returns The smallest integer greater than or equal to the provided number.
|
|
13
|
+
* @category Rounding
|
|
14
|
+
* @tags rounding, ceiling
|
|
15
|
+
*/
|
|
16
|
+
export function ceil(x) {
|
|
17
|
+
x = +x;
|
|
18
|
+
if (x !== x || x === POSITIVE_INFINITY || x === NEGATIVE_INFINITY)
|
|
19
|
+
return x;
|
|
20
|
+
if (x === 0)
|
|
21
|
+
return x;
|
|
22
|
+
const remainder = x % 1;
|
|
23
|
+
if (remainder === 0)
|
|
24
|
+
return x;
|
|
25
|
+
if (x < 0 && x > -1)
|
|
26
|
+
return -0;
|
|
27
|
+
if (x > 0)
|
|
28
|
+
return x - remainder + 1;
|
|
29
|
+
return x - remainder;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=ceil.js.map
|
package/esm/ceil.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ceil.js","sourceRoot":"","sources":["../src/ceil.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,UAAU,IAAI,CAAC,CAAS;IAC5B,CAAC,GAAG,CAAC,CAAC,CAAC;IACP,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,iBAAiB,IAAI,CAAC,KAAK,iBAAiB;QAAE,OAAO,CAAC,CAAC;IAC5E,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,SAAS,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC,CAAC;IAC/B,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,SAAS,CAAC;AACvB,CAAC"}
|
package/esm/clamp.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clamps a number within the inclusive range specified by the lower and upper
|
|
3
|
+
* bounds. This is useful for ensuring that a number does not exceed a certain
|
|
4
|
+
* range, and is equivalent to `Math.min(Math.max(number, lower), upper)` (but
|
|
5
|
+
* with no dependency on the global `Math` object).
|
|
6
|
+
*
|
|
7
|
+
* @param number The number to clamp
|
|
8
|
+
* @param lower The lower bound of the clamp range
|
|
9
|
+
* @param upper The upper bound of the clamp range
|
|
10
|
+
* @returns The clamped value guaranteed to be within the provided range.
|
|
11
|
+
* @category Rounding
|
|
12
|
+
* @tags non-standard, clamp
|
|
13
|
+
*/
|
|
14
|
+
export declare function clamp(number: number, lower: number, upper: number): number;
|
|
15
|
+
//# sourceMappingURL=clamp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clamp.d.ts","sourceRoot":"","sources":["../src/clamp.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE1E"}
|
package/esm/clamp.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clamps a number within the inclusive range specified by the lower and upper
|
|
3
|
+
* bounds. This is useful for ensuring that a number does not exceed a certain
|
|
4
|
+
* range, and is equivalent to `Math.min(Math.max(number, lower), upper)` (but
|
|
5
|
+
* with no dependency on the global `Math` object).
|
|
6
|
+
*
|
|
7
|
+
* **Note**: this is a non-standard utility function.
|
|
8
|
+
*
|
|
9
|
+
* @module clamp
|
|
10
|
+
*/
|
|
11
|
+
import { max } from "./max.js";
|
|
12
|
+
import { min } from "./min.js";
|
|
13
|
+
/**
|
|
14
|
+
* Clamps a number within the inclusive range specified by the lower and upper
|
|
15
|
+
* bounds. This is useful for ensuring that a number does not exceed a certain
|
|
16
|
+
* range, and is equivalent to `Math.min(Math.max(number, lower), upper)` (but
|
|
17
|
+
* with no dependency on the global `Math` object).
|
|
18
|
+
*
|
|
19
|
+
* @param number The number to clamp
|
|
20
|
+
* @param lower The lower bound of the clamp range
|
|
21
|
+
* @param upper The upper bound of the clamp range
|
|
22
|
+
* @returns The clamped value guaranteed to be within the provided range.
|
|
23
|
+
* @category Rounding
|
|
24
|
+
* @tags non-standard, clamp
|
|
25
|
+
*/
|
|
26
|
+
export function clamp(number, lower, upper) {
|
|
27
|
+
return max(lower, min(number, upper));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=clamp.js.map
|
package/esm/clamp.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clamp.js","sourceRoot":"","sources":["../src/clamp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,KAAK,CAAC,MAAc,EAAE,KAAa,EAAE,KAAa;IAChE,OAAO,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AACxC,CAAC"}
|
package/esm/clz32.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides a performant, zero-dependency implementation of the
|
|
3
|
+
* `Math.clz32` function, which counts the number of leading zero bits in the
|
|
4
|
+
* 32-bit binary representation of a number.
|
|
5
|
+
*
|
|
6
|
+
* @module clz32
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Performant local implementation of the `Math.clz32` function, which counts
|
|
10
|
+
* the number of leading zero bits in the 32-bit binary representation of a
|
|
11
|
+
* number.
|
|
12
|
+
*
|
|
13
|
+
* @param x The number to count the leading zero bits of.
|
|
14
|
+
* @returns The number of leading zero bits in the 32-bit binary representation
|
|
15
|
+
* of the number.
|
|
16
|
+
* @category Bitwise
|
|
17
|
+
* @tags clz32
|
|
18
|
+
*/
|
|
19
|
+
export declare function clz32(x: number): number;
|
|
20
|
+
//# sourceMappingURL=clz32.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clz32.d.ts","sourceRoot":"","sources":["../src/clz32.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAyBvC"}
|
package/esm/clz32.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides a performant, zero-dependency implementation of the
|
|
3
|
+
* `Math.clz32` function, which counts the number of leading zero bits in the
|
|
4
|
+
* 32-bit binary representation of a number.
|
|
5
|
+
*
|
|
6
|
+
* @module clz32
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Performant local implementation of the `Math.clz32` function, which counts
|
|
10
|
+
* the number of leading zero bits in the 32-bit binary representation of a
|
|
11
|
+
* number.
|
|
12
|
+
*
|
|
13
|
+
* @param x The number to count the leading zero bits of.
|
|
14
|
+
* @returns The number of leading zero bits in the 32-bit binary representation
|
|
15
|
+
* of the number.
|
|
16
|
+
* @category Bitwise
|
|
17
|
+
* @tags clz32
|
|
18
|
+
*/
|
|
19
|
+
export function clz32(x) {
|
|
20
|
+
x >>>= 0;
|
|
21
|
+
if (x === 0)
|
|
22
|
+
return 32;
|
|
23
|
+
let count = 0;
|
|
24
|
+
if ((x & 0xFFFF0000) === 0) {
|
|
25
|
+
count += 16;
|
|
26
|
+
x <<= 16;
|
|
27
|
+
}
|
|
28
|
+
if ((x & 0xFF000000) === 0) {
|
|
29
|
+
count += 8;
|
|
30
|
+
x <<= 8;
|
|
31
|
+
}
|
|
32
|
+
if ((x & 0xF0000000) === 0) {
|
|
33
|
+
count += 4;
|
|
34
|
+
x <<= 4;
|
|
35
|
+
}
|
|
36
|
+
if ((x & 0xC0000000) === 0) {
|
|
37
|
+
count += 2;
|
|
38
|
+
x <<= 2;
|
|
39
|
+
}
|
|
40
|
+
if ((x & 0x80000000) === 0) {
|
|
41
|
+
count += 1;
|
|
42
|
+
}
|
|
43
|
+
return count;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=clz32.js.map
|
package/esm/clz32.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clz32.js","sourceRoot":"","sources":["../src/clz32.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,KAAK,CAAC,CAAS;IAC7B,CAAC,MAAM,CAAC,CAAC;IACT,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEvB,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,KAAK,IAAI,EAAE,CAAC;QACZ,CAAC,KAAK,EAAE,CAAC;IACX,CAAC;IACD,IAAI,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,KAAK,IAAI,CAAC,CAAC;QACX,CAAC,KAAK,CAAC,CAAC;IACV,CAAC;IACD,IAAI,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,KAAK,IAAI,CAAC,CAAC;QACX,CAAC,KAAK,CAAC,CAAC;IACV,CAAC;IACD,IAAI,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,KAAK,IAAI,CAAC,CAAC;QACX,CAAC,KAAK,CAAC,CAAC;IACV,CAAC;IACD,IAAI,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,KAAK,IAAI,CAAC,CAAC;IACb,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides a constant value for the mathematical constant `e` on
|
|
3
|
+
* the runtime value-level, and also the compile-time type-only level.
|
|
4
|
+
*
|
|
5
|
+
* @module e
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Represents the mathematical constant `e` (Euler's number), the base of the
|
|
9
|
+
* natural logarithm, approximately equal to `2.718281828459045`.
|
|
10
|
+
*
|
|
11
|
+
* This is a local implementation of the native `Math.E` constant.
|
|
12
|
+
* @category Constants
|
|
13
|
+
* @tags E
|
|
14
|
+
*/
|
|
15
|
+
export declare const E: E;
|
|
16
|
+
export type E = 2.718281828459045;
|
|
17
|
+
//# sourceMappingURL=e.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e.d.ts","sourceRoot":"","sources":["../../src/constants/e.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,CAAC,EAAE,CAAqB,CAAC;AAEtC,MAAM,MAAM,CAAC,GAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides a constant value for the mathematical constant `e` on
|
|
3
|
+
* the runtime value-level, and also the compile-time type-only level.
|
|
4
|
+
*
|
|
5
|
+
* @module e
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Represents the mathematical constant `e` (Euler's number), the base of the
|
|
9
|
+
* natural logarithm, approximately equal to `2.718281828459045`.
|
|
10
|
+
*
|
|
11
|
+
* This is a local implementation of the native `Math.E` constant.
|
|
12
|
+
* @category Constants
|
|
13
|
+
* @tags E
|
|
14
|
+
*/
|
|
15
|
+
export const E = 2.718281828459045;
|
|
16
|
+
//# sourceMappingURL=e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e.js","sourceRoot":"","sources":["../../src/constants/e.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,CAAC,GAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides the mathematical constant `EPSILON` on the runtime
|
|
3
|
+
* value-level, and also the compile-time type-only level.
|
|
4
|
+
*
|
|
5
|
+
* The `EPSILON` constant represents the difference between `1` and the
|
|
6
|
+
* smallest value greater than `1` that can be represented as a `number` value.
|
|
7
|
+
*
|
|
8
|
+
* This is approximately equal to `2.220446049250313e-16`, and is provided as a
|
|
9
|
+
* local implementation of the native `Number.EPSILON` constant.
|
|
10
|
+
*
|
|
11
|
+
* @module epsilon
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Represents the smallest positive number that can be added to `1` to get a
|
|
15
|
+
* result different from `1`.
|
|
16
|
+
*
|
|
17
|
+
* This is approximately equal to `2.220446049250313e-16`.
|
|
18
|
+
*
|
|
19
|
+
* @category Constants
|
|
20
|
+
* @tags Number, Epsilon
|
|
21
|
+
*/
|
|
22
|
+
export declare const EPSILON: EPSILON;
|
|
23
|
+
export type EPSILON = 2.220446049250313e-16;
|
|
24
|
+
//# sourceMappingURL=epsilon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"epsilon.d.ts","sourceRoot":"","sources":["../../src/constants/epsilon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO,EAAE,OAA+B,CAAC;AAEtD,MAAM,MAAM,OAAO,GAAG,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides the mathematical constant `EPSILON` on the runtime
|
|
3
|
+
* value-level, and also the compile-time type-only level.
|
|
4
|
+
*
|
|
5
|
+
* The `EPSILON` constant represents the difference between `1` and the
|
|
6
|
+
* smallest value greater than `1` that can be represented as a `number` value.
|
|
7
|
+
*
|
|
8
|
+
* This is approximately equal to `2.220446049250313e-16`, and is provided as a
|
|
9
|
+
* local implementation of the native `Number.EPSILON` constant.
|
|
10
|
+
*
|
|
11
|
+
* @module epsilon
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Represents the smallest positive number that can be added to `1` to get a
|
|
15
|
+
* result different from `1`.
|
|
16
|
+
*
|
|
17
|
+
* This is approximately equal to `2.220446049250313e-16`.
|
|
18
|
+
*
|
|
19
|
+
* @category Constants
|
|
20
|
+
* @tags Number, Epsilon
|
|
21
|
+
*/
|
|
22
|
+
export const EPSILON = 2.220446049250313e-16;
|
|
23
|
+
//# sourceMappingURL=epsilon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"epsilon.js","sourceRoot":"","sources":["../../src/constants/epsilon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,OAAO,GAAY,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module re-exports all of the `@nick/math/constants/*` submodules.
|
|
3
|
+
*
|
|
4
|
+
* @module constants
|
|
5
|
+
*/
|
|
6
|
+
export * from "./e.js";
|
|
7
|
+
export * from "./epsilon.js";
|
|
8
|
+
export * from "./infinity.js";
|
|
9
|
+
export * from "./ln10.js";
|
|
10
|
+
export * from "./ln2.js";
|
|
11
|
+
export * from "./log10e.js";
|
|
12
|
+
export * from "./log2e.js";
|
|
13
|
+
export * from "./max_safe_integer.js";
|
|
14
|
+
export * from "./max_value.js";
|
|
15
|
+
export * from "./min_safe_integer.js";
|
|
16
|
+
export * from "./min_value.js";
|
|
17
|
+
export * from "./nan.js";
|
|
18
|
+
export * from "./negative_zero.js";
|
|
19
|
+
export * from "./pi.js";
|
|
20
|
+
export * from "./positive_zero.js";
|
|
21
|
+
export * from "./sqrt1_2.js";
|
|
22
|
+
export * from "./sqrt2.js";
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module re-exports all of the `@nick/math/constants/*` submodules.
|
|
3
|
+
*
|
|
4
|
+
* @module constants
|
|
5
|
+
*/
|
|
6
|
+
export * from "./e.js";
|
|
7
|
+
export * from "./epsilon.js";
|
|
8
|
+
export * from "./infinity.js";
|
|
9
|
+
export * from "./ln10.js";
|
|
10
|
+
export * from "./ln2.js";
|
|
11
|
+
export * from "./log10e.js";
|
|
12
|
+
export * from "./log2e.js";
|
|
13
|
+
export * from "./max_safe_integer.js";
|
|
14
|
+
export * from "./max_value.js";
|
|
15
|
+
export * from "./min_safe_integer.js";
|
|
16
|
+
export * from "./min_value.js";
|
|
17
|
+
export * from "./nan.js";
|
|
18
|
+
export * from "./negative_zero.js";
|
|
19
|
+
export * from "./pi.js";
|
|
20
|
+
export * from "./positive_zero.js";
|
|
21
|
+
export * from "./sqrt1_2.js";
|
|
22
|
+
export * from "./sqrt2.js";
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infinity.d.ts","sourceRoot":"","sources":["../../src/constants/infinity.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infinity.js","sourceRoot":"","sources":["../../src/constants/infinity.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the natural logarithm of `10`, approximately equal to
|
|
3
|
+
* `2.302585092994046`.
|
|
4
|
+
*
|
|
5
|
+
* This is a local implementation of the native `Math.LN10` constant.
|
|
6
|
+
* @category Constants
|
|
7
|
+
*/
|
|
8
|
+
export declare const LN10: LN10;
|
|
9
|
+
export type LN10 = 2.302585092994046;
|
|
10
|
+
//# sourceMappingURL=ln10.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ln10.d.ts","sourceRoot":"","sources":["../../src/constants/ln10.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,EAAE,IAAwB,CAAC;AAC5C,MAAM,MAAM,IAAI,GAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the natural logarithm of `10`, approximately equal to
|
|
3
|
+
* `2.302585092994046`.
|
|
4
|
+
*
|
|
5
|
+
* This is a local implementation of the native `Math.LN10` constant.
|
|
6
|
+
* @category Constants
|
|
7
|
+
*/
|
|
8
|
+
export const LN10 = 2.302585092994046;
|
|
9
|
+
//# sourceMappingURL=ln10.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ln10.js","sourceRoot":"","sources":["../../src/constants/ln10.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,IAAI,GAAS,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the natural logarithm of `2`, approximately equal to
|
|
3
|
+
* `0.6931471805599453`.
|
|
4
|
+
*
|
|
5
|
+
* This is a local implementation of the native `Math.LN2` constant.
|
|
6
|
+
* @category Constants
|
|
7
|
+
*/
|
|
8
|
+
export declare const LN2: LN2;
|
|
9
|
+
export type LN2 = 0.6931471805599453;
|
|
10
|
+
//# sourceMappingURL=ln2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ln2.d.ts","sourceRoot":"","sources":["../../src/constants/ln2.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,GAAG,EAAE,GAAwB,CAAC;AAC3C,MAAM,MAAM,GAAG,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the natural logarithm of `2`, approximately equal to
|
|
3
|
+
* `0.6931471805599453`.
|
|
4
|
+
*
|
|
5
|
+
* This is a local implementation of the native `Math.LN2` constant.
|
|
6
|
+
* @category Constants
|
|
7
|
+
*/
|
|
8
|
+
export const LN2 = 0.6931471805599453;
|
|
9
|
+
//# sourceMappingURL=ln2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ln2.js","sourceRoot":"","sources":["../../src/constants/ln2.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,GAAG,GAAQ,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the base-10 logarithm of `e` (Euler's number), approximately
|
|
3
|
+
* equal to `0.4342944819032518`.
|
|
4
|
+
*
|
|
5
|
+
* This is a local implementation of the native `Math.LOG10E` constant.
|
|
6
|
+
* @category Constants
|
|
7
|
+
*/
|
|
8
|
+
export declare const LOG10E: LOG10E;
|
|
9
|
+
export type LOG10E = 0.4342944819032518;
|
|
10
|
+
//# sourceMappingURL=log10e.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log10e.d.ts","sourceRoot":"","sources":["../../src/constants/log10e.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,EAAE,MAA2B,CAAC;AACjD,MAAM,MAAM,MAAM,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the base-10 logarithm of `e` (Euler's number), approximately
|
|
3
|
+
* equal to `0.4342944819032518`.
|
|
4
|
+
*
|
|
5
|
+
* This is a local implementation of the native `Math.LOG10E` constant.
|
|
6
|
+
* @category Constants
|
|
7
|
+
*/
|
|
8
|
+
export const LOG10E = 0.4342944819032518;
|
|
9
|
+
//# sourceMappingURL=log10e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log10e.js","sourceRoot":"","sources":["../../src/constants/log10e.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAW,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the base-2 logarithm of `e` (Euler's number), approximately equal
|
|
3
|
+
* to `1.4426950408889634`.
|
|
4
|
+
*
|
|
5
|
+
* This is a local implementation of the native `Math.LOG2E` constant.
|
|
6
|
+
* @category Constants
|
|
7
|
+
*/
|
|
8
|
+
export declare const LOG2E: LOG2E;
|
|
9
|
+
export type LOG2E = 1.4426950408889634;
|
|
10
|
+
//# sourceMappingURL=log2e.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log2e.d.ts","sourceRoot":"","sources":["../../src/constants/log2e.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE,KAA0B,CAAC;AAC/C,MAAM,MAAM,KAAK,GAAG,kBAAkB,CAAC"}
|