thanks again OldDosLover. your work in qb64 and your comments are always appreciated. i have left a small explanation at the bottom of my nspace source code to explain as simply as i can how it works.
this idea is also used in my nspace algo. it saves an expensive use of pythagorean theorem and as far as i can tell is still very accurate! if you find it is not, you could use that distance formula instead.
Oops!
Oops, you forgot something.