Use core::mix
MODIFY
source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp
source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp
@@ -196,10 +196,7 @@ void CSceneNodeAnimatorCameraMaya::animateNode(IDummyTransformationSceneNode *no
auto getValueDependentOnHandOrientation = [&](const float& expression)
{
- if (camera->getLeftHanded())
- return expression;
- else
- return -expression;
+ return core::mix<float, bool>(-expression, expression, camera->getLeftHanded());
};
if (isMouseKeyDown(0) && !Zooming)

MODIFY
source/Irrlicht/CSceneNodeAnimatorCameraModifiedMaya.cpp
source/Irrlicht/CSceneNodeAnimatorCameraModifiedMaya.cpp
@@ -241,13 +241,9 @@ namespace irr
}
// Rotation ------------------------------------
-
auto getValueDependentOnHandOrientation = [&](const float& expression)
{
- if (camera->getLeftHanded())
- return expression;
- else
- return -expression;
+ return core::mix<float, bool>(-expression, expression, camera->getLeftHanded());
};
if (isMouseKeyDown(0) && !(StepZooming || Zooming))

Use core::mix