Add Vector2 extensions.

This commit is contained in:
2024-01-21 18:16:42 +01:00
parent bd5ddc8d4b
commit ff2246f74a
2 changed files with 14 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
using System.Numerics;
namespace DaggerFramework.Extensions
{
public static class Vector2Extensions
{
public static Vector2 Lerp(this Vector2 a, Vector2 b, double t)
{
return new Vector2(MathUtils.Lerp(a.X, b.X, t), MathUtils.Lerp(a.Y, b.Y, t));
}
}
}