Nobel prize

Mark Smith mark at maseurope.net
Fri Oct 20 06:49:02 EDT 2006


Being a complete dunce when it comes to mathematics, I am insanely  
pleased with myself for having come up with a function to calculate  
the distance between two points, using my dimly remembered schoolboy  
geometry (Miss Stacey at Wimbledon College Preparatory would be  
blushing with pride) -- the square of the hypotenuse is equal to the  
square of the other two sides in a right angled triangle.

The function is this :

function pointDistance point1,point2

   put ABS(item 1 of point1 - item 1 of point2) ^ 2 into square1
   put ABS(item 2 of point1 - item 2 of point2) ^ 2 into square2

   return trunc(sqrt(square1 + square2))

end pointDistance

However, being a complete dunce when it comes to mathematics, it  
occurs to me that there may be other, better ways to do this, which I  
can't even imagine.

So what does the list think? Nobel prize or dunces cap?


Best,

Mark



More information about the use-livecode mailing list