Line class

Constructors

Line(Angle slope, num bias)
const
Line.fromSlopePoint(Angle slope, Coord point)
Line.fromTwoPoints((Coord, Coord) coords)
factory

Properties

bias num
final
c num
Value of 'c' in eqn: ax + by + c = 0
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
slope Angle
final

Methods

contains(Coord point, [num error = kDefaultError]) bool
distanceFromPoint(Coord point) num
evaluate(Coord point) num
intersect(Line line, [num errorTolerance = kDefaultError]) Coord?
Returns null if lines are parallel
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
perpendicular(Coord point) Line
Perpendicular line passing through point.
perpendicularFoot(Coord point) Coord
Value of the perpendicular foot from a point on the line. i.e the intersection of the perpendicular
pointOnLineClosestTo(Coord point) Coord
pointsOnLineFromPoint(Coord point, num distance) → (Coord, Coord)
Returns two coords equal distance, distance from the given point on the line.
pointXDirectionToLine(Coord point) num?
Returns -1 for left, 1 for right and 0 in case the point lies on the line and null in case the line is horizontal.
rotate(Coord point, Angle theta, [bool antiClockwise = true]) Line
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited