|
@@ -222,12 +222,8 @@ namespace Framework
|
|
|
//! Ermittelt den Winkel zwischen zwei Vektoren
|
|
//! Ermittelt den Winkel zwischen zwei Vektoren
|
|
|
inline T angle(const Vec2& v2) const
|
|
inline T angle(const Vec2& v2) const
|
|
|
{
|
|
{
|
|
|
- return (T)lowPrecisionACos(
|
|
|
|
|
- MIN(MAX((float)(*this * v2)
|
|
|
|
|
- / (float)sqrt(
|
|
|
|
|
- (float)(getLengthSq() * v2.getLengthSq())),
|
|
|
|
|
- -1),
|
|
|
|
|
- 1));
|
|
|
|
|
|
|
+ return (T)atan2(
|
|
|
|
|
+ (float)(x * v2.y -y * v2.x), (float)(*this * v2));
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
} // namespace Framework
|
|
} // namespace Framework
|