Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Check if line is straight

by lidden (Curate)
on May 16, 2011 at 23:13 UTC ( #905169=note: print w/replies, xml ) Need Help??


in reply to Re^2: Check if line is straight
in thread Check if line is straight

return abs(($x2-$x1)*($y-$y1)-($x-$x1)*($y2-$y1)) < $tolerance;

Update added abs()

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://905169]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2016-12-03 22:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (60 votes). Check out past polls.