Topic List |
Page List:
1 |
---|---|
teep_ 04/12/23 2:40:24 PM #1: |
already kicking in eheu It involves coding, which I haven't done in years ever since I finished university --- I ... am ... atomic ... Copied to Clipboard!
|
catfan2008 04/12/23 2:46:25 PM #2: |
Just remember 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 ) ); // 1st iteration //y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed return y; } --- Meow Meow I have dyslexia so please don't make fun of my writing. ... Copied to Clipboard!
|
teep_ 04/12/23 2:50:25 PM #3: |
catfan2008 posted... 0x5f3759dfis that a memory address? Since they're usually hex-based iirc --- I ... am ... atomic ... Copied to Clipboard!
|
catfan2008 04/12/23 2:51:43 PM #4: |
https://en.wikipedia.org/wiki/Fast_inverse_square_root --- Meow Meow I have dyslexia so please don't make fun of my writing. ... Copied to Clipboard!
|
legendarylemur 04/12/23 3:19:32 PM #5: |
You know, I was actually wondering why it was generally accepted Inverse Square Root was computationally faster and cheaper. Had no idea it was popularized by Quake III Arena code --- "Iwata was awesome" - Mr. Nintendo https://i.imgur.com/krtFHol.jpg ... Copied to Clipboard!
|
teep_ 04/12/23 10:46:56 PM #6: |
catfan2008 posted... https://en.wikipedia.org/wiki/Fast_inverse_square_rootThat's computer science level coding. Thankfully I'd only need to do chemical engineer level coding --- I ... am ... atomic ... Copied to Clipboard!
|
Topic List |
Page List:
1 |