public void TestCrossCalculation() { Assert.AreEqual(30d, (Expedition.FromMetersPerSquareSecond(10d) * Mass.FromGram(3, UnitPrefix.Kilo)).Newton); Assert.AreEqual(2d, (Force.FromNewton(10d) / Mass.FromGram(5, UnitPrefix.Kilo)).MetersPerSquareSecond); Assert.AreEqual(10d, (Energy.FromJoule(20d) / Length.FromMeter(2d)).Newton); Assert.AreEqual(10d, (Force.FromNewton(20d) / SquareLength.FromMeter(2d)).Pascal); }
public void TestExpeditionConvert() { Assert.AreEqual(1.0197162129779282d, Expedition.FromMetersPerSquareSecond(10d).Gravity, DoubleDelta); var unit = Expedition.Unit.CreateUnit((Length.Unit.Meter, null), (Duration.Unit.Minute, null)); Assert.AreEqual(35999.9999999712d, Expedition.FromMetersPerSquareSecond(10d).GetValue(unit), DoubleDelta); }
public void TestExpeditionCrossCalculation() { Assert.AreEqual(2d, (Velocity.FromMeterPerSecond(10d) / Duration.FromSecond(5)).MetersPerSquareSecond, DoubleDelta); Assert.AreEqual(50d, (Expedition.FromMetersPerSquareSecond(10d) * Duration.FromSecond(5)).MeterPerSecond, DoubleDelta); }
public void TestExpeditionCalculation() { Assert.AreEqual(9.4901418935110359d, (Expedition.FromGravity(10d) - Expedition.FromMetersPerSquareSecond(5d)).Gravity, DoubleDelta); Assert.AreEqual(10.509858106489d, (Expedition.FromGravity(10d) + Expedition.FromMetersPerSquareSecond(5d)).Gravity, DoubleDelta); }
public void TestExpeditionValue() { Assert.AreEqual(10d, Expedition.FromGravity(10d).Gravity, DoubleDelta); Assert.AreEqual(10d, Expedition.FromMetersPerSquareSecond(10d).MetersPerSquareSecond, DoubleDelta); }
public static Expedition operator /(Velocity s, Duration t) => Expedition.FromMetersPerSquareSecond(s.MeterPerSecond / t.Second);
public static Expedition operator /(Force f, Mass w) => Expedition.FromMetersPerSquareSecond(f.Newton / w.GetGram(UnitPrefix.Kilo));