@hyperfrontend/immutable-api-utils/built-in-copy/mathmath
Locked, prototype-pollution-resistant copies of the global Math static methods and constants.
References to Math.E, Math.PI, Math.LN2, Math.LN10, Math.LOG2E, Math.LOG10E, Math.SQRT2, Math.SQRT1_2, plus the full set of math functions (abs, floor, ceil, round, sqrt, pow, trig, logarithms, etc.) are captured at module-load time and frozen into a tamper-proof namespace, so numeric computations stay deterministic even if the global Math is later patched. Effective only when imported before any untrusted code has had a chance to mutate the prototype chain.
API Reference
● Variables
(Safe copy) Returns the absolute value of a number.
(Safe copy) Returns the arccosine of a number.
(Safe copy) Returns the inverse hyperbolic cosine of a number.
(Safe copy) Returns the arcsine of a number.
(Safe copy) Returns the inverse hyperbolic sine of a number.
(Safe copy) Returns the arctangent of a number.
(Safe copy) Returns the arctangent of the quotient of its arguments.
(Safe copy) Returns the inverse hyperbolic tangent of a number.
(Safe copy) Returns the cube root of a number.
(Safe copy) Returns the smallest integer greater than or equal to a number.
(Safe copy) Returns the number of leading zero bits in the 32-bit binary representation.
(Safe copy) Returns the cosine of a number.
(Safe copy) Returns the hyperbolic cosine of a number.
(Safe copy) The mathematical constant e, approximately 2.718.
(Safe copy) Returns e raised to the power of a number.
(Safe copy) Returns e raised to the power of a number minus 1.
(Safe copy) Returns the largest integer less than or equal to a number.
(Safe copy) Returns the nearest 32-bit single precision float representation.
(Safe copy) Returns the square root of the sum of squares of its arguments.
(Safe copy) Returns the result of the C-like 32-bit multiplication.
(Safe copy) The natural logarithm of 10, approximately 2.303.
(Safe copy) The natural logarithm of 2, approximately 0.693.
(Safe copy) Returns the natural logarithm of a number.
(Safe copy) Returns the base-10 logarithm of a number.
(Safe copy) The base-10 logarithm of e, approximately 0.434.
(Safe copy) Returns the natural logarithm of 1 + a number.
(Safe copy) Returns the base-2 logarithm of a number.
(Safe copy) The base-2 logarithm of e, approximately 1.443.
(Safe copy) Namespace object containing all Math utilities. Note: Importing this imports all methods in this namespace (no tree-shaking).
(Safe copy) Returns the larger of zero or more numbers.
(Safe copy) Returns the smaller of zero or more numbers.
(Safe copy) The mathematical constant π, approximately 3.14159.
(Safe copy) Returns the base to the exponent power.
(Safe copy) Returns a pseudo-random number between 0 and 1. Note: This is NOT cryptographically secure. For secure random values, use crypto.getRandomValues().
(Safe copy) Returns the value of a number rounded to the nearest integer.
(Safe copy) Returns the sign of a number (-1, 0, or 1).
(Safe copy) Returns the sine of a number.
(Safe copy) Returns the hyperbolic sine of a number.
(Safe copy) Returns the square root of a number.
(Safe copy) The square root of 1/2, approximately 0.707.
(Safe copy) The square root of 2, approximately 1.414.
(Safe copy) Returns the tangent of a number.
(Safe copy) Returns the hyperbolic tangent of a number.
(Safe copy) Returns the integer part of a number by removing fractional digits.