|
@@ -168,6 +168,9 @@ public:
|
|
|
/// Calculate absolute dot product.
|
|
/// Calculate absolute dot product.
|
|
|
float AbsDotProduct(const Vector2& rhs) const { return Urho3D::Abs(x_ * rhs.x_) + Urho3D::Abs(y_ * rhs.y_); }
|
|
float AbsDotProduct(const Vector2& rhs) const { return Urho3D::Abs(x_ * rhs.x_) + Urho3D::Abs(y_ * rhs.y_); }
|
|
|
|
|
|
|
|
|
|
+ /// Returns the angle between this vector and another vector in degrees.
|
|
|
|
|
+ float Angle(const Vector2& rhs) const { return Urho3D::Acos(DotProduct(rhs) / (Length() * rhs.Length())); }
|
|
|
|
|
+
|
|
|
/// Return absolute vector.
|
|
/// Return absolute vector.
|
|
|
Vector2 Abs() const { return Vector2(Urho3D::Abs(x_), Urho3D::Abs(y_)); }
|
|
Vector2 Abs() const { return Vector2(Urho3D::Abs(x_), Urho3D::Abs(y_)); }
|
|
|
|
|
|