mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-16 05:34:16 +01:00
move AnimUtil into correct namespace
This commit is contained in:
parent
2857f37b00
commit
71c8f453d0
1 changed files with 29 additions and 12 deletions
|
|
@ -1,19 +1,36 @@
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
|
||||||
/// <summary>
|
namespace Dalamud.Interface.Animation
|
||||||
/// Class providing helper functions when facilitating animations.
|
|
||||||
/// </summary>
|
|
||||||
public static class AnimUtil
|
|
||||||
{
|
{
|
||||||
public static float Lerp(float firstFloat, float secondFloat, float by)
|
/// <summary>
|
||||||
|
/// Class providing helper functions when facilitating animations.
|
||||||
|
/// </summary>
|
||||||
|
public static class AnimUtil
|
||||||
{
|
{
|
||||||
return (firstFloat * (1 - @by)) + (secondFloat * by);
|
/// <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)
|
||||||
|
{
|
||||||
|
return (firstFloat * (1 - @by)) + (secondFloat * by);
|
||||||
|
}
|
||||||
|
|
||||||
public static Vector2 Lerp(Vector2 firstVector, Vector2 secondVector, float by)
|
/// <summary>
|
||||||
{
|
/// Lerp between two vectors.
|
||||||
var retX = Lerp(firstVector.X, secondVector.X, by);
|
/// </summary>
|
||||||
var retY = Lerp(firstVector.Y, secondVector.Y, by);
|
/// <param name="firstVector">The first vector.</param>
|
||||||
return new Vector2(retX, retY);
|
/// <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)
|
||||||
|
{
|
||||||
|
var retX = Lerp(firstVector.X, secondVector.X, by);
|
||||||
|
var retY = Lerp(firstVector.Y, secondVector.Y, by);
|
||||||
|
return new Vector2(retX, retY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue