From 71c8f453d03c58c8c2db43f70b203183e77e650c Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Sun, 18 Jul 2021 21:51:19 +0200 Subject: [PATCH] move AnimUtil into correct namespace --- Dalamud/Interface/Animation/AnimUtil.cs | 41 +++++++++++++++++-------- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/Dalamud/Interface/Animation/AnimUtil.cs b/Dalamud/Interface/Animation/AnimUtil.cs index 923f5ef37..cff36b21c 100644 --- a/Dalamud/Interface/Animation/AnimUtil.cs +++ b/Dalamud/Interface/Animation/AnimUtil.cs @@ -1,19 +1,36 @@ using System.Numerics; -/// -/// Class providing helper functions when facilitating animations. -/// -public static class AnimUtil +namespace Dalamud.Interface.Animation { - public static float Lerp(float firstFloat, float secondFloat, float by) + /// + /// Class providing helper functions when facilitating animations. + /// + public static class AnimUtil { - return (firstFloat * (1 - @by)) + (secondFloat * by); - } + /// + /// Lerp between two floats. + /// + /// The first float. + /// The second float. + /// The point to lerp to. + /// The lerped value. + public static float Lerp(float firstFloat, float secondFloat, float by) + { + return (firstFloat * (1 - @by)) + (secondFloat * by); + } - public static Vector2 Lerp(Vector2 firstVector, Vector2 secondVector, float by) - { - var retX = Lerp(firstVector.X, secondVector.X, by); - var retY = Lerp(firstVector.Y, secondVector.Y, by); - return new Vector2(retX, retY); + /// + /// Lerp between two vectors. + /// + /// The first vector. + /// The second float. + /// The point to lerp to. + /// The lerped vector. + public static Vector2 Lerp(Vector2 firstVector, Vector2 secondVector, float by) + { + var retX = Lerp(firstVector.X, secondVector.X, by); + var retY = Lerp(firstVector.Y, secondVector.Y, by); + return new Vector2(retX, retY); + } } }