failed-fastInverseSqrtJS/index.js

9 lines
159 B
JavaScript
Raw Normal View History

2023-11-23 14:42:46 -06:00
//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;
}