File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2865,7 +2865,7 @@ float Planet::getVMagnitude(const StelCore* core) const
28652865double Planet::getAngularRadius (const StelCore* core) const
28662866{
28672867 const double rad = (rings ? rings->getSize () : equatorialRadius);
2868- return std::atan2 (rad*sphereScale, getJ2000EquatorialPos (core).norm ()) * M_180_PI;
2868+ return std::asin (rad*sphereScale/ getJ2000EquatorialPos (core).norm ()) * M_180_PI;
28692869}
28702870
28712871
Original file line number Diff line number Diff line change @@ -1319,10 +1319,10 @@ void StarMgr::draw(StelCore* core)
13191319 PlanetP moon = GETSTELMODULE (SolarSystem)->getMoon ();
13201320 Vec3d moonPos=moon->getJ2000EquatorialPos (core);
13211321 const double moonRadius = moon->getEquatorialRadius () * moon->getSphereScale ();
1322- double angularSize = atan2 (moonRadius, moonPos.norm ());
1322+ double angularSize = asin (moonRadius / moonPos.norm ());
13231323 moonPos.normalize ();
13241324 SphericalCap moonCap (moonPos, cos (angularSize));
1325- for (auto cap : viewportCaps)
1325+ for (auto & cap : viewportCaps)
13261326 {
13271327 if (cap.intersects (moonCap))
13281328 filterMoon=true ;
You can’t perform that action at this time.
0 commit comments