mirror of https://github.com/AxioDL/zeus.git
CVector3f/CVector2f: Fix clamp in getAngleDiff
This commit is contained in:
parent
5520001117
commit
f99184556a
|
@ -14,7 +14,7 @@ float CVector2f::getAngleDiff(const CVector2f& a, const CVector2f& b) {
|
|||
return 0.f;
|
||||
|
||||
float dot = a.dot(b);
|
||||
return std::acos(std::clamp(-1.f, dot / (mag1 * mag2), 1.f));
|
||||
return std::acos(zeus::clamp(-1.f, dot / (mag1 * mag2), 1.f));
|
||||
}
|
||||
|
||||
CVector2f CVector2f::slerp(const CVector2f& a, const CVector2f& b, float t) {
|
||||
|
|
|
@ -16,7 +16,7 @@ float CVector3f::getAngleDiff(const CVector3f& a, const CVector3f& b) {
|
|||
return 0.f;
|
||||
|
||||
float dot = a.dot(b);
|
||||
return std::acos(std::clamp(-1.f, dot / (mag1 * mag2), 1.f));
|
||||
return std::acos(zeus::clamp(-1.f, dot / (mag1 * mag2), 1.f));
|
||||
}
|
||||
|
||||
CVector3f CVector3f::slerp(const CVector3f& a, const CVector3f& b, CRelAngle clampAngle) {
|
||||
|
|
Loading…
Reference in New Issue