OMG, Sqrt/ArcCos within the inner cycle!
http://cboard.cprogramming.com/game-...algorithm.html