public static TweenFunc<float> CubicBezier (float mx1, float my1, float mx2, float my2) {
var curve = new BezierCurveCubic(
new Vector2(0f, 0f),
new Vector2(1f, 1f),
new Vector2(mx1, my1),
new Vector2(mx2, my2)
);
return (from, to, t) => {
return from + (to - from) * curve.CalculatePoint(t).Y;
};
}