Home

# Class goog.math.Line

Object representing a line.

Instance Method Summary
| `clone() ⇒ !goog.math.Line`
| `equals(?goog.math.Line other) ⇒ boolean` Tests whether the given line is exactly the same as this one.
| `getClosestLinearInterpolation_((goog.math.Coordinate|null|number) x, number= opt_y) ⇒ number` Computes the interpolation parameter for the point on the line closest to a given point.
| `getClosestPoint((goog.math.Coordinate|null|number) x, number= opt_y) ⇒ !goog.math.Coordinate` Computes the point on the line closest to a given point. Note that a line in this case is defined as the infinite line going through the start and end points. To find the closest point on the line segment itself see {@see #getClosestSegmentPoint}.
| `getClosestSegmentPoint((goog.math.Coordinate|null|number) x, number= opt_y) ⇒ !goog.math.Coordinate` Computes the point on the line segment closest to a given point.
| `getInterpolatedPoint(number t) ⇒ !goog.math.Coordinate` Returns the point on the line segment proportional to t, where for t = 0 we return the starting point and for t = 1 we return the end point. For t < 0 or t > 1 we extrapolate along the line defined by the line segment.
| `getSegmentLength() ⇒ number`
| `getSegmentLengthSquared() ⇒ number`