Skip to content

is there a logic error in Line::isOnEdge() function? #5

@zhuzy-2018

Description

@zhuzy-2018

in iou.cpp line27-29,it is said:
if (abs(pp1^pp2) < EPS &&
pp1pp2 < EPS)
return true;
which from my point of view is |pp1|
|pp2|sin(pp1,pp2)<EPS and |pp1||pp2|*cos(pp1,pp2)<EPS.
but it doesnt mean that p is on p1p2.

why dont you use the value of cos/sin of pp1 and pp2 to judge if p in on line p1p2?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions