http://qs321.pair.com?node_id=905021


in reply to Check if line is straight

If you really want to check colinearity of three points, you can just multiply vectors:
sub isCorrectPath () { my ($x1, $y1, $x2, $y2, $x, $y) = @_; return !(($x2-$x1)*($y-$y1)-($x-$x1)*($y2-$y1)); }