Point.distance_to_line

Point.distance_to_line(line)[source]

Compute the distance to a line.

Parameters

line ([point, point] or compas.geometry.Line.) – The line.

Returns

float – The distance.

Examples

>>> from compas.geometry import Line
>>> point = Point(0.0, 0.0, 0.0)
>>> line = Line(Point(1.0, 0.0, 0.0), Point(1.0, 1.0, 0.0))
>>> point.distance_to_line(line)
1.0