]> git.mxchange.org Git - flightgear.git/commitdiff
Minor code cleanup.
authordavid <david>
Wed, 26 Feb 2003 19:20:02 +0000 (19:20 +0000)
committerdavid <david>
Wed, 26 Feb 2003 19:20:02 +0000 (19:20 +0000)
src/FDM/JSBSim/FGAtmosphere.cpp

index f80affcbd052a49a0b2f7f0aac90779ac0af0d58..dcaa9d43c0a94c75dd58bb9672cc62a6de13df9d 100644 (file)
@@ -262,12 +262,12 @@ void FGAtmosphere::Turbulence(void)
 {
   switch (turbType) {
   case ttBerndt: {
-    vDirectiondAccelDt(eX) = 1 - 2.0*(((double)(rand()))/RAND_MAX);
-    vDirectiondAccelDt(eY) = 1 - 2.0*(((double)(rand()))/RAND_MAX);
-    vDirectiondAccelDt(eZ) = 1 - 2.0*(((double)(rand()))/RAND_MAX);
+    vDirectiondAccelDt(eX) = 1 - 2.0*(double(rand())/double(RAND_MAX));
+    vDirectiondAccelDt(eY) = 1 - 2.0*(double(rand())/double(RAND_MAX));
+    vDirectiondAccelDt(eZ) = 1 - 2.0*(double(rand())/double(RAND_MAX));
 
     
-    MagnitudedAccelDt = 1 - 2.0*(((double)(rand()))/RAND_MAX) - Magnitude;
+    MagnitudedAccelDt = 1 - 2.0*(double(rand())/double(RAND_MAX)) - Magnitude;
     MagnitudeAccel    += MagnitudedAccelDt*rate*State->Getdt();
     Magnitude         += MagnitudeAccel*rate*State->Getdt();