feat(Animation): add OutCubic

This commit is contained in:
goat 2021-07-18 22:57:13 +02:00
parent 788914ce8c
commit 85b19cafbc
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -0,0 +1,27 @@
using System;
namespace Dalamud.Interface.Animation.EasingFunctions
{
/// <summary>
/// Class providing an "OutCubic" easing animation.
/// </summary>
public class OutCubic : Easing
{
/// <summary>
/// Initializes a new instance of the <see cref="OutCubic"/> class.
/// </summary>
/// <param name="duration">The duration of the animation.</param>
public OutCubic(TimeSpan duration)
: base(duration)
{
// ignored
}
/// <inheritdoc/>
public override void Update()
{
var p = this.Progress;
this.Value = 1 - Math.Pow(1 - p, 3);
}
}
}