failed-fastInverseSqrtJS/index.js
2023-11-23 20:42:46 +00:00

8 lines
159 B
JavaScript

//wow.
function fastInvSqrt(x) {
var xhalf = 0.5 * x;
var i = x;
i = i * (1.5 - xhalf * i * i);
i = i * (1.5 - xhalf * i * i);
return i;
}