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