Line
A representation of a line segment.
-
Line()
-
Line(a: Vec2, b: Vec2)
-
Line(a: Vec2, bx: float, by: float)
-
Line(ax: float, ay: float, b: Vec2)
-
Line(ax: float, ay: float, bx: float, by: float)
Properties
Name | Description | Type |
---|---|---|
a | The starting point of the line | Vec2 |
b | The ending point of the line | Vec2 |
ax | The x-coordinate of the starting point | float |
ay | The y-coordinate of the starting point | float |
bx | The x-coordinate of the ending point | float |
by | The y-coordinate of the ending point | float |
length | The length of the line | float |
Methods
Move
move(offset: Vec2) → None
Move the line by a specified offset.
Parameters
offset
: The offset to move the line by.
Copy
copy() → Line
Create a copy of the line.