Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
This?
of course you could avoid the multiplication by providing an accurate threshold smaller than 1. It'll become more complicated with two coordinates, than I'd say Pythagoras is accurate enough° editPythagoras sqr( d_x ** 2 + d_y ** 2 ) with d_ for delta= abs(c0-c1)
Cheers Rolf °) even for spherical coordinates of that size (but don't use this for the distance between New York and Seattle, you might fall off the edge of the world) In reply to Re: Check whether two numbers are within a range
by LanX
|
|