From da419257558c15d9369e999a9e8f9db5ac04735a Mon Sep 17 00:00:00 2001
From: goat <16760685+goaaats@users.noreply.github.com>
Date: Sun, 18 Jul 2021 19:32:02 +0200
Subject: [PATCH] feat(Animation): add InOutQuint
---
.../Animation/EasingFunctions/InOutQuint.cs | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 Dalamud/Interface/Animation/EasingFunctions/InOutQuint.cs
diff --git a/Dalamud/Interface/Animation/EasingFunctions/InOutQuint.cs b/Dalamud/Interface/Animation/EasingFunctions/InOutQuint.cs
new file mode 100644
index 000000000..70f3123aa
--- /dev/null
+++ b/Dalamud/Interface/Animation/EasingFunctions/InOutQuint.cs
@@ -0,0 +1,27 @@
+using System;
+
+namespace Dalamud.Interface.Animation.EasingFunctions
+{
+ ///
+ /// Class providing an "InOutQuint" easing animation.
+ ///
+ public class InOutQuint : Easing
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The duration of the animation.
+ public InOutQuint(TimeSpan duration)
+ : base(duration)
+ {
+ // ignored
+ }
+
+ ///
+ 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);
+ }
+ }
+}