3 ms·
I tried implementing it in JS just for fun. I don't get how/why it works, but it does. http://codepen.io/anon/pen/OWgYaP http://codepen.io/anon/pen/OWgYaP
by echeese 10y ago
I tried implementing it in JS just for fun. I don't get how/why it works, but it does.
http://codepen.io/anon/pen/OWgYaP http://codepen.io/anon/pen/OWgYaP
- popey456963 10y agoIs your implementation correct? I get strange values. Q_rsqrt(16) = 0.24957678739619552 I'm not sure if I'm just not doing something correctly. Even if I go to a smaller number I get: Q_rsqrt(0.125) = 2.828426859705843 Which is vastly off (10x ish)