Linear change in value. Useful when assigning delegates to control animation. - CSharp System

CSharp examples for System:Math Easing Function

Description

Linear change in value. Useful when assigning delegates to control animation.

Demo Code


using System;/*  w w  w. j av a2 s .  co  m*/

public class Main{
        /// <summary>
   /// Linear change in value.
   /// Useful when assigning delegates to control animation. 
   /// </summary>
   /// <param name="t">Current time in seconds.</param>
   /// <param name="b">Starting value.</param>
   /// <param name="c">Change in value.</param>
   /// <param name="d">Duration of animation.</param>
   /// <returns>The correct value.</returns>
   public static double Linear( double t, double b, double c, double d )
   {
      return c * t / d + b;
   }
}

Related Tutorials