public void Clamp2() { VectorD clamped = new VectorD(new double[] { -10, 1, 100, 1000 }); clamped.Clamp(-1, 0); Assert.AreEqual(-1, clamped[0]); Assert.AreEqual(0, clamped[1]); Assert.AreEqual(0, clamped[2]); Assert.AreEqual(0, clamped[3]); }