JS: Math fround, clz32, imul
Math.fround(x)-
(new in ECMAScript 2015)
Return the nearest 32bits representation of x.
Math.fround()rounds a JavaScript number (which is always 64-bit double precision) to the nearest 32-bit single-precision floating-point number (the same format used by float in C, Java, etc.).JavaScript numbers are double precision (64-bit) by default. This gives very high precision, but sometimes you need to match 32-bit float behavior.
Math.clz32(x)-
(new in ECMAScript 2015)
Return the number of leading zero bits in the 32-bit binary representation of x.
Math.imul(a, b)-
(new in ECMAScript 2015)
multiplies a and b as though they were 32 bit signed integers.
JavaScript. math functions.
- JS: Math (namespace)
- JS: Math. max, min
- JS: Math. sign, abs
- JS: Math ceiling, floor, round, truncate
- JS: Math. random
- JS: Power and Roots
- JS: Math exponential and logarithm
- JS: Math constants. pi, e, sqrt, etc.
- JS: Math trig functions. sin, cos, tan, asin, acos, atan
- JS: Math hyperbolic functions. sinh, cosh, tanh, etc.
- JS: Math fround, clz32, imul