public void TestBaseConvertFrom2() { Assert.Equal(-0.125m, MathS.FromBaseN("-0.125", 10)); Assert.Equal(0.25m, MathS.FromBaseN("0.3", 12)); }
public void TestBaseConvertFrom1() { Assert.Equal(-10.25m, MathS.FromBaseN("-A.4", 16)); Assert.Equal(-140, MathS.FromBaseN("-A0", 14)); }
public void TestBaseConvertFrom0() { Assert.Equal(10, MathS.FromBaseN("A", 16)); Assert.Equal(10, MathS.FromBaseN("1010", 2)); }
public void TestNSFrom2() { Assert.IsTrue(MathS.FromBaseN("-0.125", 10) == -0.125m); Assert.IsTrue(MathS.FromBaseN("0.3", 12) == 0.25m); }
public void TestNSFrom1() { Assert.IsTrue(MathS.FromBaseN("-A.4", 16) == -10.25m); Assert.IsTrue(MathS.FromBaseN("-A0", 14) == -140); }
public void TestNSFrom0() { Assert.IsTrue(MathS.FromBaseN("A", 16) == 10); Assert.IsTrue(MathS.FromBaseN("1010", 2) == 10); }