public Double Addition( Double angle1Value, GeometricAngle.MeasurementUnit angle1MeasurementUnit, Double angle2Value, GeometricAngle.MeasurementUnit angle2MeasurementUnit, GeometricAngle.MeasurementUnit outputAngleMeasurementUnit) { GeometricAngle first = GeometricAngle.FromSpecifiedUnit(angle1Value, angle1MeasurementUnit); GeometricAngle second = GeometricAngle.FromSpecifiedUnit(angle2Value, angle2MeasurementUnit); GeometricAngle sum = first + second; return sum.GetValueInUnitType(outputAngleMeasurementUnit); }
public Int32 Comparison( Double angle1Value, GeometricAngle.MeasurementUnit angle1MeasurementUnit, Double angle2Value, GeometricAngle.MeasurementUnit angle2MeasurementUnit ) { GeometricAngle first = GeometricAngle.FromSpecifiedUnit(angle1Value, angle1MeasurementUnit); GeometricAngle second = GeometricAngle.FromSpecifiedUnit(angle2Value, angle2MeasurementUnit); Int32 firstComparison = first.CompareTo((Object)second); Int32 secondComparison = first.CompareTo(second); Int32 thirdComparison = GeometricAngle.Compare(first, second); Assert.IsTrue(firstComparison == secondComparison && secondComparison == thirdComparison); return firstComparison; }
public Boolean Equality( Double angle1Value, GeometricAngle.MeasurementUnit angle1MeasurementUnit, Double angle2Value, GeometricAngle.MeasurementUnit angle2MeasurementUnit ) { GeometricAngle first = GeometricAngle.FromSpecifiedUnit(angle1Value, angle1MeasurementUnit); GeometricAngle second = GeometricAngle.FromSpecifiedUnit(angle2Value, angle2MeasurementUnit); return GeometricAngle.AreEqual(first, second); }
public String ToString(Double angleValue, GeometricAngle.MeasurementUnit angleMeasurementUnit) { GeometricAngle geometricAngle = GeometricAngle.FromSpecifiedUnit(angleValue, angleMeasurementUnit); return geometricAngle.ToString(); }
public Double Subtraction( Double angle1Value, GeometricAngle.MeasurementUnit angle1MeasurementUnit, Double angle2Value, GeometricAngle.MeasurementUnit angle2MeasurementUnit, GeometricAngle.MeasurementUnit outputAngleMeasurementUnit) { GeometricAngle minuend = GeometricAngle.FromSpecifiedUnit(angle1Value, angle1MeasurementUnit); GeometricAngle subtrahend = GeometricAngle.FromSpecifiedUnit(angle2Value, angle2MeasurementUnit); GeometricAngle difference = minuend - subtrahend; return difference.GetValueInUnitType(outputAngleMeasurementUnit); }
public Boolean EqualityGreaterLesserOperators( Double angle1Value, GeometricAngle.MeasurementUnit angle1MeasurementUnit, Double angle2Value, GeometricAngle.MeasurementUnit angle2MeasurementUnit, Byte operatorType) { GeometricAngle first = GeometricAngle.FromSpecifiedUnit(angle1Value, angle1MeasurementUnit); GeometricAngle second = GeometricAngle.FromSpecifiedUnit(angle2Value, angle2MeasurementUnit); switch (operatorType) { case 1: return first == second; case 2: return first != second; case 3: return first > second; case 4: return first < second; case 5: return first >= second; case 6: return first <= second; default: throw new InvalidOperationException(); } }