public static void CompareTo_Double() { double angleEqual = Numbers.PiOver2; AngularOffset offset = new AngularOffset(new Angle(0), new Angle(angleEqual)); Assert.AreEqual(0, offset.CompareTo(angleEqual)); double angleGreater = Numbers.Pi; Assert.AreEqual(-1, offset.CompareTo(angleGreater)); double angleLesser = Numbers.PiOver4; Assert.AreEqual(1, offset.CompareTo(angleLesser)); }
public static void CompareTo_Angle() { AngularOffset offset = new AngularOffset(new Angle(), new Angle(Numbers.PiOver2)); AngularOffset angleEqual = new AngularOffset(new Angle(), new Angle(Numbers.PiOver2)); Assert.AreEqual(0, offset.CompareTo(angleEqual)); AngularOffset angleGreater = new AngularOffset(new Angle(), new Angle(Numbers.Pi)); Assert.AreEqual(-1, offset.CompareTo(angleGreater)); AngularOffset angleLesser = new AngularOffset(new Angle(), new Angle(Numbers.PiOver4)); Assert.AreEqual(1, offset.CompareTo(angleLesser)); }