math
Vector3D
¶
A generic 3D vector class supporting basic vector operations.
| ATTRIBUTE | DESCRIPTION |
|---|---|
x |
X coordinate
TYPE:
|
y |
Y coordinate
TYPE:
|
z |
Z coordinate
TYPE:
|
to_floor
¶
magnitude
¶
magnitude() -> float
Calculate the magnitude (length) of the vector.
| RETURNS | DESCRIPTION |
|---|---|
float
|
Magnitude of the vector |
magnitude_squared
¶
normalize
¶
distance_to
¶
copy
¶
copy() -> Vector3D[T]
Return a copy of the vector.
| RETURNS | DESCRIPTION |
|---|---|
Vector3D[T]
|
A new Vector3D instance with the same components. |
dot
¶
cross
¶
is_zero
¶
lerp
¶
clamp_magnitude
¶
angle_to
¶
project_onto
¶
reflect
¶
Vector2D
¶
A generic 2D vector class supporting basic vector operations.
| ATTRIBUTE | DESCRIPTION |
|---|---|
x |
X coordinate
TYPE:
|
y |
Y coordinate
TYPE:
|
to_int
¶
magnitude
¶
magnitude() -> float
Calculate the magnitude (length) of the vector.
| RETURNS | DESCRIPTION |
|---|---|
float
|
Magnitude of the vector |
magnitude_squared
¶
normalize
¶
distance_to
¶
copy
¶
copy() -> Vector2D[T]
Return a copy of the vector.
| RETURNS | DESCRIPTION |
|---|---|
Vector2D[T]
|
A new Vector2D instance with the same components. |
dot
¶
is_zero
¶
lerp
¶
clamp_magnitude
¶
Rotation
¶
Represents rotation with pitch and yaw angles in degrees.
Angles are normalized to the range [-180, 180] degrees.
| ATTRIBUTE | DESCRIPTION |
|---|---|
yaw |
Yaw angle in degrees, normalized to (-180, 180)
TYPE:
|
pitch |
Pitch angle in degrees, normalized to (-180, 180)
TYPE:
|