public void CutToMaxLengthTest(double x, double y, double expectedX, double expectedY, double maxLength) { var vector = new Vector2D(x, y); var result = vector.CutToMaxLength(maxLength); Assert.AreEqual(expectedX, result.X, 0.0001); Assert.AreEqual(expectedY, result.Y, 0.0001); }