Replace angle conversions with zeus implementation

This commit is contained in:
Jack Andersen 2016-04-20 11:50:11 -10:00
parent 9b14f0b381
commit 2260632ac6
2 changed files with 5 additions and 5 deletions

View File

@ -69,7 +69,7 @@ CLight::CLight(ELightType type,
{
case ELightType::Spot:
{
float cosCutoff = std::cos(cutoff * M_PIF / 180.f);
float cosCutoff = std::cos(zeus::degToRad(cutoff));
x30_angleC = 0.f;
x34_angleL = -cosCutoff / (1.0 - cosCutoff);
x38_angleQ = 1.f / (1.0 - cosCutoff);

View File

@ -277,7 +277,7 @@ CFluidUVMotion ScriptLoader::LoadFluidUVMotion(CInputStream& in)
CFluidUVMotion::EFluidUVMotion motion = CFluidUVMotion::EFluidUVMotion(in.readUint32Big());
float a = in.readFloatBig();
float b = in.readFloatBig();
b = ((M_PIF * b) / 180.f) - M_PIF;
b = zeus::degToRad(b) - M_PIF;
float c = in.readFloatBig();
float d = in.readFloatBig();
CFluidUVMotion::SFluidLayerMotion motionLayer2(motion, a, b, c, d);
@ -285,7 +285,7 @@ CFluidUVMotion ScriptLoader::LoadFluidUVMotion(CInputStream& in)
motion = CFluidUVMotion::EFluidUVMotion(in.readUint32Big());
a = in.readFloatBig();
b = in.readFloatBig();
b = ((M_PIF * b) / 180.f) - M_PIF;
b = zeus::degToRad(b) - M_PIF;
c = in.readFloatBig();
d = in.readFloatBig();
CFluidUVMotion::SFluidLayerMotion motionLayer3(motion, a, b, c, d);
@ -293,7 +293,7 @@ CFluidUVMotion ScriptLoader::LoadFluidUVMotion(CInputStream& in)
motion = CFluidUVMotion::EFluidUVMotion(in.readUint32Big());
a = in.readFloatBig();
b = in.readFloatBig();
b = ((M_PIF * b) / 180.f) - M_PIF;
b = zeus::degToRad(b) - M_PIF;
c = in.readFloatBig();
d = in.readFloatBig();
CFluidUVMotion::SFluidLayerMotion motionLayer1(motion, a, b, c, d);
@ -301,7 +301,7 @@ CFluidUVMotion ScriptLoader::LoadFluidUVMotion(CInputStream& in)
a = in.readFloatBig();
b = in.readFloatBig();
b = ((M_PIF * b) / 180.f) - M_PIF;
b = zeus::degToRad(b) - M_PIF;
return CFluidUVMotion(a, b, motionLayer1, motionLayer2, motionLayer3);
}