File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2567,7 +2567,7 @@ float Planet::getVMagnitude(const StelCore* core) const
25672567double Planet::getAngularSize (const StelCore* core) const
25682568{
25692569 const double rad = (rings ? rings->getSize () : equatorialRadius);
2570- return std::atan2 (rad*sphereScale, getJ2000EquatorialPos (core).length ()) * M_180_PI;
2570+ return std::asin (rad*sphereScale/ getJ2000EquatorialPos (core).length ()) * M_180_PI;
25712571}
25722572
25732573
Original file line number Diff line number Diff line change @@ -1278,7 +1278,7 @@ void StarMgr::draw(StelCore* core)
12781278 PlanetP moon = GETSTELMODULE (SolarSystem)->getMoon ();
12791279 Vec3d moonPos=moon->getJ2000EquatorialPos (core);
12801280 const double moonRadius = moon->getEquatorialRadius () * moon->getSphereScale ();
1281- double angularSize = atan2 (moonRadius, moonPos.length ());
1281+ double angularSize = asin (moonRadius / moonPos.length ());
12821282 moonPos.normalize ();
12831283 SphericalCap moonCap (moonPos, cos (angularSize));
12841284 for (auto cap : viewportCaps)
You can’t perform that action at this time.
0 commit comments