esnext.math.degrees.js 301 B

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