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); */ }
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)); }