public void LengthOf1VectorIsSqrtN() { Assert.AreEqual(Math.Sqrt(R1_1.Coordinates.Length), R1_1.GetLength()); Assert.AreEqual(Math.Sqrt(R2_1.Coordinates.Length), R2_1.GetLength()); Assert.AreEqual(Math.Sqrt(R3_1.Coordinates.Length), R3_1.GetLength()); Assert.AreEqual(Math.Sqrt(R100_1.Coordinates.Length), R100_1.GetLength()); }
public void LengthOfNormalizedNonZeroVectorIsOne() { R1_1.Normalize(); R2_1.Normalize(); R3_1.Normalize(); R100_1.Normalize(); Assert.AreEqual(1, R1_1.GetLength(), General.Eps); Assert.AreEqual(1, R2_1.GetLength(), General.Eps); Assert.AreEqual(1, R3_1.GetLength(), General.Eps); Assert.AreEqual(1, R100_1.GetLength(), General.Eps); }