Example #1
0
        public Vec3D ToRectangular()
        {
            return(Vec3D.PolarToRectangular(RA.Get() * 15d, Declination.Get()));

            /*
             * double x = Math.Sin (RA.Get()*15d * M.DEG2RAD) * Math.Cos(Declination.Get()*M.DEG2RAD);
             * double y = Math.Sin (Declination.Get() * M.DEG2RAD);
             * double z = Math.Cos (RA.Get()*15d * M.DEG2RAD) * Math.Cos(Declination.Get()*M.DEG2RAD);
             *
             * return new Vec3D(x, y, z);
             */
        }
Example #2
0
        public Vec3D ToRectangular()
        {
            return(Vec3D.PolarToRectangular(Azimuth.Get(), Altitude.Get()));

            /*
             * double x = Math.Sin (Azimuth.Get() * M.DEG2RAD) * Math.Cos(Altitude.Get()*M.DEG2RAD);
             * double y = Math.Sin (Altitude.Get() * M.DEG2RAD);
             * double z = Math.Cos (Azimuth.Get() * M.DEG2RAD) * Math.Cos(Altitude.Get()*M.DEG2RAD);
             * return new Vec3D (x, y, z);
             */
        }
Example #3
0
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            DegreesAngle other = null;

            try{
                other = obj as DegreesAngle;
            }catch (InvalidCastException i) {
                Debug.Log("Cast exception ");
                return(false);
            }

            double otherAngle = other.Get();

            return(degrees > (otherAngle - THRESHOLD) && degrees < (otherAngle + THRESHOLD));
        }