Update EaseUtil.cs

This commit is contained in:
陈思海 2026-04-01 14:53:56 +08:00
parent ff545585d7
commit 4dff3a98bc

View File

@ -131,9 +131,7 @@ public class EaseUtil
double c1 = 1.70158;
double c2 = c1 * 1.525;
return x < 0.5 ?
Math.Pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 :
(Math.Pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2;
return x < 0.5 ? Math.Pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.Pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2;
}
public static double EaseInElastic(float x)