public static FVector2 Lerp(FVector2 from, FVector2 to, fint t) { t = FMath.Clamp01(t); return(new FVector2(from.X + (to.X - from.X) * t, from.Y + (to.Y - from.Y) * t)); }
public static fint Distance(FVector2 a, FVector2 b) { return((a - b).magnitude); }
public static fint Dot(FVector2 lhs, FVector2 rhs) { return(lhs.X * rhs.X + lhs.Y * rhs.Y); }
// // Static Methods // public static fint Angle(FVector2 from, FVector2 to) { return(FMath.Acos(FMath.Clamp(FVector2.Dot(from.normalized, to.normalized), -fint.one, fint.one)) * FMath.Rad2Deg); }
public void Scale(FVector2 scale) { this.X *= scale.X; this.Y *= scale.Y; }
public static fint SqrMagnitude(FVector2 a) { return(a.X * a.X + a.Y * a.Y); }
public static FVector2 Scale(FVector2 a, FVector2 b) { return(new FVector2(a.X * b.X, a.Y * b.Y)); }
public static FVector2 Min(FVector2 lhs, FVector2 rhs) { return(new FVector2(FMath.Min(lhs.X, rhs.X), FMath.Min(lhs.Y, rhs.Y))); }