{"_id":"ecma-proposal-math-extensions","_rev":"4-b3a380553f8dcf70097119446741bc80","name":"ecma-proposal-math-extensions","description":"Tests and a polyfill for the ES2017 Math Extensions Proposal","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"ecma-proposal-math-extensions","version":"0.0.1","description":"Tests and a polyfill for the ES2017 Math Extensions Proposal","main":"reference-implementation/index.js","scripts":{"clean":"rm -rf out","build":"npm run clean && mkdir -p out && ecmarkup src/spec.html --js=out/spec.js --css=out/spec.css | js-beautify -f - --type=html -t > out/index.html","test":"test262-harness --prelude=reference-implementation/index.js --consoleCommand='node --harmony' --runner=console test/built-ins/Math/**/*.js"},"repository":{"type":"git","url":"git+https://github.com/tc39/proposal-math-extensions.git"},"keywords":["ecmascript","math","test262","Math.map","Math.remap","Math.scale","Math.clamp","Math.constrain","Math.radians","Math.degrees"],"author":{"name":"Rick Waldron"},"license":"MIT","devDependencies":{"ecmarkup":"^3.0.1","js-beautify":"^1.6.2","test262-harness":"^1.5.6"},"gitHead":"f90ec2253f86ca064f113640285cd5e04c9f977e","bugs":{"url":"https://github.com/tc39/proposal-math-extensions/issues"},"homepage":"https://github.com/tc39/proposal-math-extensions#readme","_id":"ecma-proposal-math-extensions@0.0.1","_shasum":"864ab1357bd8731bc0c55b2f71dbbb8ca3593d6c","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"rwaldron","email":"waldron.rick@gmail.com"},"maintainers":[{"name":"rwaldron","email":"waldron.rick@gmail.com"}],"dist":{"shasum":"864ab1357bd8731bc0c55b2f71dbbb8ca3593d6c","tarball":"https://registry.npmjs.org/ecma-proposal-math-extensions/-/ecma-proposal-math-extensions-0.0.1.tgz","integrity":"sha512-bxNd+kg3X1l/huYlsfYnBG2VEsn1zyjadH1GFkkemuv/P1ueGnrl8cc/dHkyHyeBozh0KZv7zPFqUHEaErmofw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEfwnfoouJgjVjGj7aeVLb7I0m29DE90g6SELbvrWg0AIhALbb3VQpUykSRkY8sZwgzX8MByEr/iH1q4yOsZaL0HvC"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ecma-proposal-math-extensions-0.0.1.tgz_1469747778410_0.7530040249694139"}},"0.0.2":{"name":"ecma-proposal-math-extensions","version":"0.0.2","description":"Tests and a polyfill for the ES2017 Math Extensions Proposal","main":"reference-implementation/index.js","scripts":{"clean":"rm -rf out","build":"npm run clean && mkdir -p out && ecmarkup src/spec.html --js=out/spec.js --css=out/spec.css | js-beautify -f - --type=html -t > out/index.html","test":"test262-harness --prelude=reference-implementation/index.js --consoleCommand='node --harmony' --runner=console test/built-ins/Math/**/*.js"},"repository":{"type":"git","url":"git+https://github.com/tc39/proposal-math-extensions.git"},"keywords":["ecmascript","math","test262","Math.map","Math.remap","Math.scale","Math.clamp","Math.constrain","Math.radians","Math.degrees"],"author":{"name":"Rick Waldron"},"license":"MIT","devDependencies":{"ecmarkup":"^3.0.1","js-beautify":"^1.6.2","test262-harness":"^1.5.6"},"gitHead":"cbec05a7dd3d38466a9bbb2717a997b7012c6961","bugs":{"url":"https://github.com/tc39/proposal-math-extensions/issues"},"homepage":"https://github.com/tc39/proposal-math-extensions#readme","_id":"ecma-proposal-math-extensions@0.0.2","_shasum":"a6a3d64819db70cee0d2e1976b6315d00e4714a0","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"rwaldron","email":"waldron.rick@gmail.com"},"maintainers":[{"name":"rwaldron","email":"waldron.rick@gmail.com"}],"dist":{"shasum":"a6a3d64819db70cee0d2e1976b6315d00e4714a0","tarball":"https://registry.npmjs.org/ecma-proposal-math-extensions/-/ecma-proposal-math-extensions-0.0.2.tgz","integrity":"sha512-80BnDp2Fn7RxXlEr5HHZblniY4aQ97MOAicdWWpSo0vkQiISSE9wLR4SqxKsu4gCtXFBIPPzy8JMhay4NWRg/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvY3+/MbUMbm78UG3STpK9BjVzvc5OnmJiEnr4j0HangIgPzVECs+xtvYNr+aN4+J/OKhuMlAKeBlpYkSXg1TY8ic="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ecma-proposal-math-extensions-0.0.2.tgz_1469747912318_0.11816048668697476"}}},"readme":"# `Math` Extensions Proposal\n\n\n- [Polyfill](https://www.npmjs.com/package/ecma-proposal-math-extensions)\n- [Spec](https://rwaldron.github.io/proposal-math-extensions)\n\n\n## Champion\n\nRick Waldron\n\n\n## Status\n\nThis proposal is currently stage 1 of [the TC39 process](https://github.com/tc39/ecma262/).\n\n\n## Motivation\n\n\nThese functions exist in many, many JS libraries either hand rolled or via  [many modules on npm](https://www.npmjs.com/search?q=math). Providing them as built-ins serves to pave cow path. Implementations and naming is inconsistent. Several other languages offer these as built-ins.\n\n\nJava\n- https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html\n  + `Math`\n    + `Math.toDegrees(double angrad)`\n    + `Math.toRadians(double angdeg)`\n- JSR275\n  + [Unit specification](https://www.jcp.org/en/jsr/detail?id=275)\n- [JScience](http://jscience.org/)\n\n\nPython\n- Math\n  - https://docs.python.org/2/library/math.html#angular-conversion\n  - https://docs.python.org/3/library/math.html#angular-conversion\n    + `math`\n      + `math.degrees(x)`\n      + `math.radians(x)`\n- [Units](https://pypi.python.org/pypi/units)\n\nRacket\n- [Math](https://docs.racket-lang.org/reference/generic-numbers.html#%28def._%28%28lib._racket%2Fmath..rkt%29._degrees-~3eradians%29%29)\n  + 4.2.2.10 Extra Constants and Functions\n- [Operations on Measures](https://docs.racket-lang.org/measures-with-dimensions/Operations__Types__and_Structs.html#%28part._.Operations_on_.Measures%29)\n  + 1.1.1 Operations on Measures\n\n\nRust\n- https://doc.rust-lang.org/std/primitive.f32.html\n- https://doc.rust-lang.org/std/primitive.f64.html\n\n\n\n\n\n## Questions\n\n- `Math.map` \n  + Is it...\n    - `Math.scale` <-- this\n    - `Math.map` \n    - `Math.remap`\n  + 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).\n- `Math.constrain`\n  + Is it...\n    - `Math.constrain` \n    - `Math.clamp`\n\n","maintainers":[{"name":"rwaldron","email":"waldron.rick@gmail.com"}],"time":{"modified":"2022-06-16T04:49:00.901Z","created":"2016-07-28T23:16:18.666Z","0.0.1":"2016-07-28T23:16:18.666Z","0.0.2":"2016-07-28T23:18:36.108Z"},"homepage":"https://github.com/tc39/proposal-math-extensions#readme","keywords":["ecmascript","math","test262","Math.map","Math.remap","Math.scale","Math.clamp","Math.constrain","Math.radians","Math.degrees"],"repository":{"type":"git","url":"git+https://github.com/tc39/proposal-math-extensions.git"},"author":{"name":"Rick Waldron"},"bugs":{"url":"https://github.com/tc39/proposal-math-extensions/issues"},"license":"MIT","readmeFilename":"README.md"}