Cast double constant to float explicitely

pull/3071/head
Andrei Kortunov 4 years ago
parent 7d5c5f8a24
commit d10399e083

@ -23,7 +23,7 @@ bool MWMechanics::AiBreathe::execute (const MWWorld::Ptr& actor, CharacterContro
actorClass.getCreatureStats(actor).setMovementFlag(CreatureStats::Flag_Run, true);
actorClass.getMovementSettings(actor).mPosition[1] = 1;
smoothTurn(actor, -osg::PI / 2, 0);
smoothTurn(actor, static_cast<float>(-osg::PI_2), 0);
return false;
}

@ -433,7 +433,7 @@ namespace MWRender
void Camera::setPitch(float angle)
{
const float epsilon = 0.000001f;
float limit = osg::PI_2 - epsilon;
float limit = static_cast<float>(osg::PI_2) - epsilon;
mPitch = osg::clampBetween(angle, -limit, limit);
}

@ -142,7 +142,7 @@ namespace SceneUtil
osg::Vec3f dir = toPos - fromPos;
dir.normalize();
osg::Quat rot = osg::Quat(-osg::PI / 2, osg::Vec3(0, 0, 1));
osg::Quat rot(static_cast<float>(-osg::PI_2), osg::Vec3f(0, 0, 1));
dir = rot * dir;
unsigned short diamondIndex = 0;

Loading…
Cancel
Save