예제 #1
0
 public void InterpolateInvertedTest()
 {
     var interpolator = new Interpolator.ChannelInterpolator(new[] {new PointF(-1000, 0), new PointF(-2000, 1)});
     interpolator.Interpolate(-1000f).ShouldBeEquivalentTo(0);
     interpolator.Interpolate(-1500f).ShouldBeEquivalentTo(0.5f);
 }
예제 #2
0
 public void InterpolateOutOfPointsTest()
 {
     var interpolator = new Interpolator.ChannelInterpolator(new[] {new PointF(0, 0), new PointF(1, 1)});
     interpolator.Interpolate(-1f).ShouldBeEquivalentTo(0f);
     interpolator.Interpolate(5f).ShouldBeEquivalentTo(5f);
 }
예제 #3
0
 public void InterpolateBetweenPointsTest()
 {
     var interpolator = new Interpolator.ChannelInterpolator(new[] {new PointF(0, 0), new PointF(1, 1)});
     interpolator.Interpolate(0.1f).ShouldBeEquivalentTo(0.1f);
     interpolator.Interpolate(0.5f).ShouldBeEquivalentTo(0.5f);
 }