JSPM

ecma-proposal-math-extensions

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3392
  • Score
    100M100P100Q135568F
  • License MIT

Tests and a polyfill for the ES2017 Math Extensions Proposal

Package Exports

  • ecma-proposal-math-extensions

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ecma-proposal-math-extensions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Math Extensions Proposal

Champion

Rick Waldron

Status

This proposal is currently stage 1 of the TC39 process.

Motivation

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

Python

Racket

Rust

Questions

  • Math.map
    • Is it...
      • Math.scale <-- this
      • Math.map
      • Math.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).
  • Math.constrain
    • Is it...
      • Math.constrain
      • Math.clamp