コード例 #1
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));
        }
コード例 #2
0
ファイル: Utils.cs プロジェクト: mymess/Planetarium
 public EquatorialCoords(HourAngle ra, DegreesAngle dec)
 {
     RA          = ra;
     Declination = dec;
 }