예제 #1
0
파일: Utils.cs 프로젝트: mymess/Planetarium
        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);
             */
        }
예제 #2
0
파일: Utils.cs 프로젝트: mymess/Planetarium
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                Debug.Log("Unequal types");
                return(false);
            }
            HourAngle other = null;

            try{
                other = obj as HourAngle;
            }catch (InvalidCastException i) {
                Debug.Log("Unequal types");
                return(false);
            }

            double otherAngle = other.Get();

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