Line
arcade.Line (Class)
Represents a line segment with a start and end point.
Instance Members
The x coordinate of the start point.
The y coordinate of the start point.
The x coordinate of the end point.
The y coordinate of the end point.
Calculates the length of the line segment.
Returns | Description |
---|---|
Float | The length of the line segment. |
Sets this line's start and end points based on the given angle and length.
Name | Type | Description |
---|---|---|
x |
Float | The x coordinate of the start point. |
y |
Float | The y coordinate of the start point. |
angle |
Float | The angle in radians. |
length |
Float | The length of the line. |
Creates a new Line instance.
Name | Type | Description |
---|---|---|
x1 |
Float | The x coordinate of the start point. |
y1 |
Float | The y coordinate of the start point. |
x2 |
Float | The x coordinate of the end point. |
y2 |
Float | The y coordinate of the end point. |