Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
(cherry picked from commit c1b8dbb)
  • Loading branch information
Mitsuhiko-Matsukawa committed Oct 24, 2022
1 parent ca14e78 commit ff4dca3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ struct get_distance_measure<CalculationType, cartesian_tag>

auto const line = detail::make::make_infinite_line<CalculationType>(p1, p2);
result_type result;
result.measure = arithmetic::side_value(line, p);
if (equals(p, p1) || equals(p, p2)) {
result.measure = 0;
}
else {
result.measure = arithmetic::side_value(line, p);
}
return result;
}
};
Expand Down

0 comments on commit ff4dca3

Please sign in to comment.