Ejemplo n.º 1
0
        public void InterpolationParabolic()
        {
            var _interpolation = new Parabolic(-2, 4, 0, 0, 2, 4);

            Assert.AreEqual(1, _interpolation.Interpolate(-1), 0.01, "Parabolic interpolation at x=-1 failed!");
            Assert.AreEqual(0, _interpolation.Interpolate(0), 0.01, "Parabolic interpolation at x=0 failed!");
            Assert.AreEqual(1, _interpolation.Interpolate(1), 0.01, "Parabolic interpolation at x=1 failed!");
            Assert.AreEqual(2.25, _interpolation.Interpolate(1.5), 0.01, "Parabolic interpolation at x=1.5 failed!");
            Assert.AreEqual(2.25, _interpolation.Interpolate(-1.5), 0.01, "Parabolic interpolation at x=-1.5 failed!");
        }
Ejemplo n.º 2
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Parabolic obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
Ejemplo n.º 3
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Parabolic obj) {
   return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
 }