| Package | com.rubenswieringa.geom |
| Class | public class Line |
| Inheritance | Line InfiniteLine |
See also
| Property | Defined by | ||
|---|---|---|---|
| a : Point
Line's first Point.
| Line | ||
| b : Point
Line's second Point.
| Line | ||
| diffX : Number [read-only]
The outcome of Point B its x-position minus Point A its x-position.
| Line | ||
| diffY : Number [read-only]
The outcome of Point B its y-position minus Point A its y-position.
| Line | ||
![]() | horizontal : Boolean
Indicates whether or not this InfiniteLine instance is horizontal.
| InfiniteLine | |
| middle : Point [read-only]
The exact center of the first and second Points of this Line.
| Line | ||
![]() | vertical : Boolean
Indicates whether or not this InfiniteLine instance is vertical.
| InfiniteLine | |
| xCoefficient : Number | Line | ||
| xIntersection : Number | Line | ||
| yCoefficient : Number | Line | ||
| yIntersection : Number | Line | ||
| Method | Defined by | ||
|---|---|---|---|
|
Line(pointA:Point = null, pointB:Point = null)
Constructor.
| Line | ||
|
clone():*
Returns a cloned instance of this Line.
| Line | ||
|
containsLine(line:Line, round:Boolean = true):Boolean
Returns true if the provided Line is in this Line.
| Line | ||
|
containsLinePartially(line:Line, round:Boolean = true):Boolean
Returns true if the provided Line is partially in this Line.
| Line | ||
|
containsPoint(point:Point, round:Boolean = true):Boolean
Returns true if the provided coordinate is on this Line.
| Line | ||
|
[static]
Creates a Line from an InfiniteLine instance.
| Line | ||
![]() |
createFromPoints(a:Point, b:Point):InfiniteLine
[static]
Creates an InfiniteLine at the hand of two Points.
| InfiniteLine | |
![]() |
createFromX(xIntersection:Number, xCoefficient:Number):InfiniteLine
[static]
Creates an InfiniteLine instance at the hand of an x-intersection and an x-coefficient.
| InfiniteLine | |
![]() |
createFromY(yIntersection:Number, yCoefficient:Number):InfiniteLine
[static]
Creates an InfiniteLine instance at the hand of an y-intersection and an y-coefficient.
| InfiniteLine | |
|
equals(line:InfiniteLine, round:Boolean = true):Boolean
Returns true if the provided Line instance is equal to this Line.
| Line | ||
![]() |
getAngle():Number
Returns the angle of this InfiniteLine with the x-axis.
| InfiniteLine | |
|
[static]
Returns a Point instance that represents the coordinate at which two Line instances intersect.
| Line | ||
![]() |
getPointByX(x:Number):Point
Return a Point on this InfiniteLine where the x-position equals the specified value.
| InfiniteLine | |
![]() |
getPointByY(y:Number):Point
Return a Point on this InfiniteLine where the y-position equals the specified value.
| InfiniteLine | |
![]() |
isParallelTo(line:InfiniteLine, round:Boolean = true):Boolean
Returns true if the provided InfiniteLine instance is parallel to this InfiniteLine.
| InfiniteLine | |
|
syncToPoints(a:Point, b:Point):void
Sets both ends of this Line instance equal to the values of the respective parameter values.
| Line | ||
|
toArray():Array
Returns an Array if which the first index and second (0 and 1) indexes are (respectively) the Line its first and second Points (a and b).
| Line | ||
|
toString():String
The String representation of this Line instance.
| Line | ||
| a | property |
a:Point [read-write]Line's first Point.
Implementation public function get a():Point
public function set a(value:Point):void
| b | property |
b:Point [read-write]Line's second Point.
Implementation public function get b():Point
public function set b(value:Point):void
| diffX | property |
diffX:Number [read-only]The outcome of Point B its x-position minus Point A its x-position.
Implementation public function get diffX():Number
See also
| diffY | property |
diffY:Number [read-only]The outcome of Point B its y-position minus Point A its y-position.
Implementation public function get diffY():Number
See also
| middle | property |
middle:Point [read-only]The exact center of the first and second Points of this Line.
Implementation public function get middle():Point
| xCoefficient | property |
xCoefficient:Number [read-write]Implementation
public function get xCoefficient():Number
public function set xCoefficient(value:Number):void
See also
| xIntersection | property |
xIntersection:Number [read-write]Implementation
public function get xIntersection():Number
public function set xIntersection(value:Number):void
See also
| yCoefficient | property |
yCoefficient:Number [read-write]Implementation
public function get yCoefficient():Number
public function set yCoefficient(value:Number):void
See also
| yIntersection | property |
yIntersection:Number [read-write]Implementation
public function get yIntersection():Number
public function set yIntersection(value:Number):void
See also
| Line | () | constructor |
public function Line(pointA:Point = null, pointB:Point = null)Constructor.
ParameterspointA:Point (default = null) — Line's first Point.
|
|
pointB:Point (default = null) — Line's second Point.
|
See also
| clone | () | method |
public override function clone():*Returns a cloned instance of this Line.
Returns* — Line
|
| containsLine | () | method |
public function containsLine(line:Line, round:Boolean = true):BooleanReturns true if the provided Line is in this Line. Note that true is only returned if both Points of the provided Line instance are on this Line.
Parametersline:Line — Line
|
|
round:Boolean (default = true) — Boolean indicating whether or not to round values before making equations.
|
Boolean |
See also
| containsLinePartially | () | method |
public function containsLinePartially(line:Line, round:Boolean = true):BooleanReturns true if the provided Line is partially in this Line.
Parametersline:Line — Line
|
|
round:Boolean (default = true) — Boolean indicating whether or not to round values before making equations.
|
Boolean |
See also
| containsPoint | () | method |
public override function containsPoint(point:Point, round:Boolean = true):BooleanReturns true if the provided coordinate is on this Line.
Parameterspoint:Point — Point instance representing a coordinate.
|
|
round:Boolean (default = true) — Boolean indicating whether or not to round values before making equations.
|
Boolean |
See also
| createFromInfinite | () | method |
public static function createFromInfinite(line:InfiniteLine, range:Number = 100):LineCreates a Line from an InfiniteLine instance.
Parametersline:InfiniteLine — InfiniteLine
|
|
range:Number (default = 100) — Distance between both ends of the returned Line and the x-intersection of the InfiniteLine. Consequently, the returned Line instance its length will be twice the value of the range parameter.
|
Line —
Line.
|
See also
| equals | () | method |
public override function equals(line:InfiniteLine, round:Boolean = true):BooleanReturns true if the provided Line instance is equal to this Line.
Parametersline:InfiniteLine — Line
|
|
round:Boolean (default = true) — Boolean indicating whether or not to round values before making equations.
|
Boolean — Boolean
|
See also
| getIntersection | () | method |
public static function getIntersection(line1:Line, line2:Line):PointReturns a Point instance that represents the coordinate at which two Line instances intersect.
Parametersline1:Line — Line
|
|
line2:Line — Line
|
Point — A Point instance if intersections occurs, null of otherwise.
|
See also
| syncToPoints | () | method |
public override function syncToPoints(a:Point, b:Point):voidSets both ends of this Line instance equal to the values of the respective parameter values. This method does nothing more than setting the values of the a and b properties.
Parametersa:Point — Line's first Point.
|
|
b:Point — Line's second Point.
|
See also
| toArray | () | method |
public function toArray():ArrayReturns an Array if which the first index and second (0 and 1) indexes are (respectively) the Line its first and second Points (a and b).
ReturnsArray — Array
|
| toString | () | method |
public override function toString():StringThe String representation of this Line instance.
ReturnsString — String
|