Rick Waldron
This proposal is currently stage 1 of the TC39 process.
These functions exist in many, many JS libraries either hand rolled or via many modules on npm. Providing them as built-ins serves to pave cow path. Implementations and naming is inconsistent. Several other languages offer these as built-ins.
Java
- https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html
MathMath.toDegrees(double angrad)Math.toRadians(double angdeg)
- JSR275
- JScience
Python
- Math
- Units
Racket
- Math
- 4.2.2.10 Extra Constants and Functions
- Operations on Measures
- 1.1.1 Operations on Measures
Rust
- https://doc.rust-lang.org/std/primitive.f32.html
- https://doc.rust-lang.org/std/primitive.f64.html
Math.map- Is it...
Math.scale<-- thisMath.mapMath.remap
- Should there be a corresponding
Math.fmap? (ie. https://tc39.github.io/ecma262/#sec-math.fround, Step 3 & 4 convert result to IEEE 754-2008 binary32 (using roundTiesToEven), then to IEEE 754-2008 binary64).
- Is it...
Math.constrain- Is it...
Math.constrainMath.clamp
- Is it...
- Polyfill.
- Also, a polyfill is available in the core-js library. You can find it in the ECMAScript proposals section.