Note
This class is in the process of being replaced by a standalone library now in development.
Simple rectangle. Will gain more functionality as needed
2d vector class, supports vector and scalar operators, and also provides a bunch of high level functions
| Returns: | The cross product |
|---|
| Returns: | The dot product |
|---|
Get the angle between the vector and the other in degrees
| Returns: | The angle |
|---|
The squared distance between the vector and other vector It is more efficent to use this method than to call get_distance() first and then do a sqrt() on the result.
| Returns: | The squared distance |
|---|
The distance between the vector and other vector
| Returns: | The distance |
|---|
Get the length of the vector.
| Returns: | The length |
|---|
Get the squared length of the vector. It is more efficent to use this method instead of first call get_length() or access .length and then do a sqrt().
| Returns: | The squared length |
|---|
Normalize the vector and return its length before the normalization
| Returns: | The length before the normalization |
|---|
Get a normalized copy of the vector
| Returns: | A normalized vector |
|---|
Create and return a new vector by rotating this vector by angle_degrees degrees clockwise.
| Returns: | Rotated vector |
|---|