Distance and inverse sqrt

Started by
2 comments, last by skow 18 years, 10 months ago
I am looking for the fastest method to calculate my distance. I have a program that tests different sqrt functions out there. I am finding many fast inverse sqrt functions, is there any way to utilize these for distance other than dividing 1.0f by the result?
Advertisement
Quote:Original post by skow
I am looking for the fastest method to calculate my distance. I have a program that tests different sqrt functions out there. I am finding many fast inverse sqrt functions, is there any way to utilize these for distance other than dividing 1.0f by the result?


sqrt(x) = x*sqrtInverse(x)
y = x * rsqrt (x)

rqrtf(x) is the very fast newton-rapson aproximation that is floating around everywhere.
Ahh, thanks guys!

This topic is closed to new replies.

Advertisement