mirror of
https://github.com/lubosz/overte.git
synced 2025-04-26 19:35:48 +02:00
use glm::clamp() instead if std::max() and min()
This commit is contained in:
parent
4655bd21dd
commit
a38c1c82d1
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ bool ElbowConstraint::apply(glm::quat& rotation) const {
|
|||
twistAngle *= copysignf(1.0f, glm::dot(glm::cross(_perpAxis, twisted), _axis));
|
||||
|
||||
// clamp twistAngle
|
||||
float clampedTwistAngle = std::max(_minAngle, std::min(twistAngle, _maxAngle));
|
||||
float clampedTwistAngle = glm::clamp(twistAngle, _minAngle, _maxAngle);
|
||||
bool twistWasClamped = (twistAngle != clampedTwistAngle);
|
||||
|
||||
// update rotation
|
||||
|
|
Loading…
Reference in a new issue