https://orutez.github.io/FootPrint/Algorithm/Fast-Inverse-Square-Root-(WTF-Function) #3
Replies: 1 comment
-
|
anyone here in 2025? 👀 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://orutez.github.io/FootPrint/Algorithm/Fast-Inverse-Square-Root-(WTF-Function)
float Q_rsqrt( float number ) { long i; float x2, y; const float threehalfs = 1.5F; x2 = number * 0.5F; y = number; i = * ( long * ) &y; // evil floating point bit level hacking i = 0x5f3759df - ( i >> 1 ); // what the fuck? y = * ( float * ) &i; y = y * ( threehalfs - ( x2 * y * y ) )...
https://orutez.github.io/FootPrint/Algorithm/Fast-Inverse-Square-Root-(WTF-Function)
Beta Was this translation helpful? Give feedback.
All reactions