move AnimUtil into correct namespace

This commit is contained in:
goat 2021-07-18 21:51:19 +02:00
parent 2857f37b00
commit 71c8f453d0
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -1,15 +1,31 @@
using System.Numerics; using System.Numerics;
namespace Dalamud.Interface.Animation
{
/// <summary> /// <summary>
/// Class providing helper functions when facilitating animations. /// Class providing helper functions when facilitating animations.
/// </summary> /// </summary>
public static class AnimUtil public static class AnimUtil
{ {
/// <summary>
/// Lerp between two floats.
/// </summary>
/// <param name="firstFloat">The first float.</param>
/// <param name="secondFloat">The second float.</param>
/// <param name="by">The point to lerp to.</param>
/// <returns>The lerped value.</returns>
public static float Lerp(float firstFloat, float secondFloat, float by) public static float Lerp(float firstFloat, float secondFloat, float by)
{ {
return (firstFloat * (1 - @by)) + (secondFloat * by); return (firstFloat * (1 - @by)) + (secondFloat * by);
} }
/// <summary>
/// Lerp between two vectors.
/// </summary>
/// <param name="firstVector">The first vector.</param>
/// <param name="secondVector">The second float.</param>
/// <param name="by">The point to lerp to.</param>
/// <returns>The lerped vector.</returns>
public static Vector2 Lerp(Vector2 firstVector, Vector2 secondVector, float by) public static Vector2 Lerp(Vector2 firstVector, Vector2 secondVector, float by)
{ {
var retX = Lerp(firstVector.X, secondVector.X, by); var retX = Lerp(firstVector.X, secondVector.X, by);
@ -17,3 +33,4 @@ public static class AnimUtil
return new Vector2(retX, retY); return new Vector2(retX, retY);
} }
} }
}