goog.math.Line
Instance Methods
this.clone() → goog.math.Line
goog.math.Line
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.equals( other ) → boolean
boolean
Tests whether the given line is exactly the same as this one.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.getClosestPoint( x, opt_y ) → goog.math.Coordinate
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 #getClosestSegmentPoint.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
this.getClosestSegmentPoint( x, opt_y ) → goog.math.Coordinate
goog.math.Coordinate
Computes the point on the line segment closest to a given point.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
this.getInterpolatedPoint( t ) → goog.math.Coordinate
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.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.getSegmentLength() → number
number
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.getSegmentLengthSquared() → number
number
Parameters | None. | ||
---|---|---|---|
Returns |
|
Instance Properties
this.x0 → number
number
X coordinate of the first point.
this.x1 → number
number
X coordinate of the first control point.
this.y0 → number
number
Y coordinate of the first point.
this.y1 → number
number
Y coordinate of the first control point.