Skip to content

Instantly share code, notes, and snippets.

View itssigron's full-sized avatar
💪
"If you can imagine it, you can achieve it"

Harel itssigron

💪
"If you can imagine it, you can achieve it"
  • Israel
View GitHub Profile
@starfys
starfys / fisr.js
Last active May 18, 2024 00:09
Fast inverse square root in Javascript
//Based on the fast inverse square root function
// https://en.wikipedia.org/wiki/Fast_inverse_square_root
// Some original comments preserved for humor value
// Designed to try to mimic the original as closely as possible
function Q_rsqrt(number)
{
var i;
var x2, y;
const threehalfs = 1.5;