Add Vector2 extensions.
This commit is contained in:
12
DaggerFramework/Source/Extensions/Vector2Extensions.cs
Normal file
12
DaggerFramework/Source/Extensions/Vector2Extensions.cs
Normal 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user