mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-04 14:35:54 +00:00
19 lines
No EOL
371 B
C#
19 lines
No EOL
371 B
C#
using Godot;
|
|
using GTweens.Easings;
|
|
|
|
namespace GTweensGodot.Extensions;
|
|
|
|
public static class CurveExtensions
|
|
{
|
|
public static EasingDelegate ToEasingDelegate(this Curve curve)
|
|
{
|
|
float Result(float a, float b, float t)
|
|
{
|
|
float newT = curve.Sample(t);
|
|
|
|
return a + ((b - a) * newT);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
} |