feat(Animation): add InOutQuint

This commit is contained in:
goat 2021-07-18 19:32:02 +02:00
parent 3ca6f5e942
commit da41925755
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 "InOutQuint" easing animation.
/// </summary>
public class InOutQuint : Easing
{
/// <summary>
/// Initializes a new instance of the <see cref="InOutQuint"/> class.
/// </summary>
/// <param name="duration">The duration of the animation.</param>
public InOutQuint(TimeSpan duration)
: base(duration)
{
// ignored
}
/// <inheritdoc/>
public override void Update()
{
var p = this.Progress;
this.Value = p < 0.5 ? 16 * p * p * p * p * p : 1 - (Math.Pow((-2 * p) + 2, 5) / 2);
}
}
}