Menu

#97 Geom.lineContainsPoint

open
nobody
None
5
2006-07-13
2006-07-13
Anonymous
No

The implementation of Geom.lineContainsPoint(...) in
release 6.0 beta 1 appears to contain a bug.

The error manifests itself when trying to select an
instance of PolyLineFigure with a SelectionTool in
cases where a line segment that makes up the
PolyLineFigure is neither horizontal nor vertical.

If the following statement that computes the slope of
the line segment

a = (y1 - y2) / (x1 - x2);

is replaced with

a = (double) (y1 - y2) / (x1 - x2);

the problem appears to be fixed.

Paul Carter
pcarter@cs.ubc.ca

Discussion


Log in to post a comment.

MongoDB Logo MongoDB