示例#1
0
        public bool EqualsThreshold(EquatorialCoords eq, double threshold)
        {
            double ra  = RA.Get();
            double dec = Declination.Get();

            //threshold in degrees
            return((ra - threshold / 15d) < eq.RA.Get() && eq.RA.Get() < (ra + threshold / 15d) &&
                   (dec - threshold) < eq.Declination.Get() && eq.Declination.Get() < (dec + threshold));
        }
示例#2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            EquatorialCoords otherEq = null;

            try{
                otherEq = obj as EquatorialCoords;
            }catch (InvalidCastException i) {
                Debug.Log("Invalid cast");
                return(false);
            }

            return(RA.Equals(otherEq.RA) && Declination.Equals(otherEq.Declination));
        }