Commit 3dc7750a authored by BRAMAS Berenger's avatar BRAMAS Berenger

remove a potential bug

parent 2abc8adc
......@@ -547,17 +547,14 @@ private:
if (ph < -M_PI + FMath::Epsilon) ph += FReal(2) * FMath::FPi;
//spherical_position_Set_th
FReal th = FMath::Fmod(FMath::ACos(spherical.getCosTheta()), FReal(2) * FMath::FPi);
FReal th = FMath::Fmod(spherical.getTheta(), FReal(2) * FMath::FPi);
if (th < 0.0) th += 2*FMath::FPi;
if (th > FMath::FPi){
th = 2*FMath::FPi - th;
//spherical_position_Set_ph(p, spherical_position_Get_ph(p) + M_PI);
ph = FMath::Fmod(ph + FMath::FPi, 2*FMath::FPi);
if (ph > M_PI) ph -= 2*FMath::FPi;
if (ph < -M_PI + FMath::Epsilon) ph += 2 * FMath::Epsilon;
th = FMath::Fmod(th, 2*FMath::FPi);
if (th > M_PI) th -= 2*FMath::FPi;
if (th < -M_PI + FMath::Epsilon) th += 2 * FMath::Epsilon;
if (ph < -M_PI + FMath::Epsilon) ph += 2 * FMath::FPi;
}
//spherical_position_Set_r
//FReal rh = spherical.r;
......@@ -575,10 +572,7 @@ private:
//spherical_position_Set_ph(p, spherical_position_Get_ph(p) + M_PI);
ph = FMath::Fmod(ph + FMath::FPi, 2*FMath::FPi);
if (ph > M_PI) ph -= 2*FMath::FPi;
if (ph < -M_PI + FMath::Epsilon) ph += 2 * FMath::Epsilon;
th = FMath::Fmod(th, 2*FMath::FPi);
if (th > M_PI) th -= 2*FMath::FPi;
if (th < -M_PI + FMath::Epsilon) th += 2 * FMath::Epsilon;
if (ph < -M_PI + FMath::Epsilon) ph += 2 * FMath::FPi;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment