namespace Utility { /// /// A static class that contains predefined scales for Interpolators. /// public static class InterpolatorScales { /// /// A linear interpolator scale. This is used by default by the Interpolator if no other scale is given. /// public static readonly InterpolatorScaleDelegate Linear = LinearInterpolation; /// /// A quadratic interpolator scale. /// public static readonly InterpolatorScaleDelegate Quadratic = QuadraticInterpolation; /// /// A cubic interpolator scale. /// public static readonly InterpolatorScaleDelegate Cubic = CubicInterpolation; /// /// A quartic interpolator scale. /// public static readonly InterpolatorScaleDelegate Quartic = QuarticInterpolation; private static float LinearInterpolation(float progress) { return progress; } private static float QuadraticInterpolation(float progress) { return progress * progress; } private static float CubicInterpolation(float progress) { return progress * progress * progress; } private static float QuarticInterpolation(float progress) { return progress * progress * progress * progress; } } }