// -----------------------------------------------------------------------
//
// Copyright 2014 MIT Licence. See licence.md for more information.
//
// -----------------------------------------------------------------------
namespace Perspex.Animation
{
///
/// Linearly eases a double value.
///
public class LinearDoubleEasing : IEasing
{
///
/// Returns the value of the transition for the specified progress.
///
/// The progress of the transition, from 0 to 1.
/// The start value of the transition.
/// The end value of the transition.
///
/// A value between and as determined
/// by .
///
public double Ease(double progress, double start, double finish)
{
return ((finish - start) * progress) + start;
}
///
/// Returns the value of the transition for the specified progress.
///
/// The progress of the transition, from 0 to 1.
/// The start value of the transition.
/// The end value of the transition.
///
/// A value between and as determined
/// by .
///
object IEasing.Ease(double progress, object start, object finish)
{
return this.Ease(progress, (double)start, (double)finish);
}
}
}