I AM COPYING IT!So don't be surprised when you find it elsewhere.
I have however, ported the method to C++, and optimised it so it doesnt use the square root function involved with calculating the distance between two points (a^2 = b^2 + c^2).
Soooo....
PYTHAGORAS THEOREM, BITCHES!
Win for not doing hard math.
First, a picture of someone else's eye (no opt):
Second (no opt):
Third, a picture of my cat (with sqrt opts):