mirror of https://github.com/CGAL/cgal
compute_linf_distance for point and line
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
This commit is contained in:
parent
3a083a94ac
commit
b7a56dc72e
|
|
@ -370,6 +370,17 @@ public: // compute_supporting_line(q.supporting_segment(), a1, b1, c1);
|
||||||
CGAL::abs(p.y() - q.y()));
|
CGAL::abs(p.y() - q.y()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
std::pair<RT,RT>
|
||||||
|
compute_linf_distance(const Point_2& p, const Line_2& l)
|
||||||
|
{
|
||||||
|
const RT nomin = CGAL::abs(l.a() * p.x() + l.b() * p.y() + l.c());
|
||||||
|
const RT denom = CGAL::abs(
|
||||||
|
l.a() +
|
||||||
|
( CGAL::sign(l.a()) == CGAL::sign(l.b())? l.b() : -l.b() ) );
|
||||||
|
return std::pair<RT,RT>(nomin, denom);
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
void compute_intersection_of_lines(
|
void compute_intersection_of_lines(
|
||||||
const Line_2& l1, const Line_2& l2,
|
const Line_2& l1, const Line_2& l2,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue