News for hackers. Stuff that matters.
Re:Fast Inverse Square Root by jtlien1 on Tuesday April 01, 2014 @04:43PM (#7511520)
A lot of times, the code you are writing does distance comparisons to determine overlap or intersection. But if all you are doing is this, then you can use the square of the distance which is just x^2 + y^2 and you have no need for a square root. Some mathematicians call this "quadrance". Or just do all your work in this metric and reserve the square rooting for when it is absolutely necessary.

There are no comments on this comment yet.