Skip to content
Snippets Groups Projects
Commit 5cbfb8f3 authored by Fernando K's avatar Fernando K
Browse files

Arruma falta de EPS

parent e749ec83
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,6 @@ pt point_in_seg(pt p, seg s) {
}
bool on_segment(seg s, pt p) {
return cross(s.aa - p, s.bb - p) == 0
&& dot(s.aa - p, s.bb - p) <= 0;
}
return abs(cross(vec(p, s.aa), vec(p, s.bb))) < EPS
&& dot(vec(p, s.aa), vec(p, s.bb)) < EPS;
}:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment