diff --git a/Dalamud/Interface/Animation/EasingFunctions/InOutSine.cs b/Dalamud/Interface/Animation/EasingFunctions/InOutSine.cs new file mode 100644 index 000000000..4808079d3 --- /dev/null +++ b/Dalamud/Interface/Animation/EasingFunctions/InOutSine.cs @@ -0,0 +1,27 @@ +using System; + +namespace Dalamud.Interface.Animation.EasingFunctions +{ + /// + /// Class providing an "InOutSine" easing animation. + /// + public class InOutSine : Easing + { + /// + /// Initializes a new instance of the class. + /// + /// The duration of the animation. + public InOutSine(TimeSpan duration) + : base(duration) + { + // ignored + } + + /// + public override void Update() + { + var p = this.Progress; + this.Value = -(Math.Cos(Math.PI * p) - 1) / 2; + } + } +}