public static float Lerp(LerpType lerpType, float value1, float value2, float amount) { if (lerpType == LerpType.Lerp) { return(FlaiMath.Lerp(value1, value2, amount)); } else if (lerpType == LerpType.Instant) { return(value2); } return(FlaiMath.SmoothStep(value1, value2, amount)); }
public static Vector2f SmoothStep(Vector2f current, Vector2f target, float amount) { return(new Vector2f { X = FlaiMath.SmoothStep(current.X, target.X, amount), Y = FlaiMath.SmoothStep(current.Y, target.Y, amount) }); }
public static Vector2d SmoothStep(Vector2d current, Vector2d target, double amount) { return(new Vector2d { X = FlaiMath.SmoothStep(current.X, target.X, amount), Y = FlaiMath.SmoothStep(current.Y, target.Y, amount) }); }