esnext.math.radians.js 301 B

123456789101112
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var DEG_PER_RAD = Math.PI / 180;
  4. // `Math.radians` method
  5. // https://rwaldron.github.io/proposal-math-extensions/
  6. $({ target: 'Math', stat: true, forced: true }, {
  7. radians: function radians(degrees) {
  8. return degrees * DEG_PER_RAD;
  9. }
  10. });