CVector3f/CVector2f: Fix clamp in getAngleDiff

This commit is contained in:
Luke Street 2020-04-19 21:01:49 -04:00
parent 5520001117
commit f99184556a
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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) {