public void ClampToZeroStatic2() { Vector2D v = new Vector2D(0.1, 0.1); v = Vector2D.ClampToZero(v, 0.11); Assert.AreEqual(Vector2D.Zero, v); v = new Vector2D(0.1, -0.11); v = Vector2D.ClampToZero(v, 0.1); Assert.AreNotEqual(Vector2D.Zero, v); }
public void ClampToZeroStatic1() { Vector2D v = new Vector2D(Numeric.EpsilonD / 2, Numeric.EpsilonD / 2); v = Vector2D.ClampToZero(v); Assert.AreEqual(Vector2D.Zero, v); v = new Vector2D(-Numeric.EpsilonD * 2, Numeric.EpsilonD); v = Vector2D.ClampToZero(v); Assert.AreNotEqual(Vector2D.Zero, v); }
public void ClampToZero2() { Vector2D v = new Vector2D(0.1, 0.1); v.ClampToZero(0.11); Assert.AreEqual(Vector2D.Zero, v); v = new Vector2D(0.1, -0.11); v.ClampToZero(0.1); Assert.AreNotEqual(Vector2D.Zero, v); }
public void ClampToZero1() { Vector2D v = new Vector2D(Numeric.EpsilonD / 2, Numeric.EpsilonD / 2); v.ClampToZero(); Assert.AreEqual(Vector2D.Zero, v); v = new Vector2D(-Numeric.EpsilonD * 2, Numeric.EpsilonD); v.ClampToZero(); Assert.AreNotEqual(Vector2D.Zero, v); }