Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 public void TestExpeditionValue()
 {
     Assert.AreEqual(10d, Expedition.FromGravity(10d).Gravity, DoubleDelta);
     Assert.AreEqual(10d, Expedition.FromMetersPerSquareSecond(10d).MetersPerSquareSecond, DoubleDelta);
 }
Exemplo n.º 6
0
 public static Expedition operator /(Velocity s, Duration t) => Expedition.FromMetersPerSquareSecond(s.MeterPerSecond / t.Second);
Exemplo n.º 7
0
 public static Expedition operator /(Force f, Mass w) => Expedition.FromMetersPerSquareSecond(f.Newton / w.GetGram(UnitPrefix.Kilo));