]> git.mxchange.org Git - simgear.git/commitdiff
using an uninitialized variable bug fixed.
authorcurt <curt>
Mon, 30 Nov 1998 17:42:37 +0000 (17:42 +0000)
committerTim Moore <timoore@redhat.com>
Tue, 15 Sep 2009 16:31:31 +0000 (18:31 +0200)
Astro/star.cxx

index f8ce2d3a13602c29dff025cf3d5f4aa0805bf515..f2b347e2a076e11fc2cb3e0126dc814fd4602259 100644 (file)
@@ -69,7 +69,7 @@ void Star::updatePosition(fgTIME *t)
   xv = cos(eccAnom) - e;
   yv = sqrt (1.0 - e*e) * sin(eccAnom);
   v = atan2 (yv, xv);                   // the sun's true anomaly
-  r = sqrt (xv*xv + yv*yv);             // and its distance
+  distance = r = sqrt (xv*xv + yv*yv);  // and its distance
 
   longitude = v + w; // the sun's true longitude