|
|
|
@ -192,9 +192,15 @@ public:
@@ -192,9 +192,15 @@ public:
|
|
|
|
|
// rotate vector by angle in radians in xy plane leaving z untouched
|
|
|
|
|
void rotate_xy(float rotation_rad); |
|
|
|
|
|
|
|
|
|
// return xy components of a vector3
|
|
|
|
|
Vector2<T> xy(); |
|
|
|
|
|
|
|
|
|
// return xy components of a vector3 as a vector2.
|
|
|
|
|
// this returns a reference to the original vector3 xy data
|
|
|
|
|
const Vector2<T> &xy() const { |
|
|
|
|
return *(const Vector2<T> *)this; |
|
|
|
|
} |
|
|
|
|
Vector2<T> &xy() { |
|
|
|
|
return *(Vector2<T> *)this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// gets the length of this vector squared
|
|
|
|
|
T length_squared() const |
|
|
|
|
{ |
|
|
|
|