Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

es.math.clz32.js 338B

123456789101112131415
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var floor = Math.floor;
  4. var log = Math.log;
  5. var LOG2E = Math.LOG2E;
  6. // `Math.clz32` method
  7. // https://tc39.es/ecma262/#sec-math.clz32
  8. $({ target: 'Math', stat: true }, {
  9. clz32: function clz32(x) {
  10. var n = x >>> 0;
  11. return n ? 31 - floor(log(n + 0.5) * LOG2E) : 32;
  12. }
  13. });