diff --git a/Runtime/RecyclerView/EaseUtil.cs b/Runtime/RecyclerView/EaseUtil.cs index c0359b6..ffa99c7 100644 --- a/Runtime/RecyclerView/EaseUtil.cs +++ b/Runtime/RecyclerView/EaseUtil.cs @@ -90,9 +90,9 @@ public class EaseUtil public static double EaseInOutExpo(float x) { return x == 0 ? 0 : - x == 1 ? 1 : - x < 0.5 ? Math.Pow(2, 20 * x - 10) / 2 : - (2 - Math.Pow(2, -20 * x + 10)) / 2; + x == 1 ? 1 : + x < 0.5 ? Math.Pow(2, 20 * x - 10) / 2 : + (2 - Math.Pow(2, -20 * x + 10)) / 2; } public static double EaseInCirc(float x) @@ -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) @@ -152,9 +150,9 @@ public class EaseUtil { double c5 = 2 * Math.PI / 4.5; return x == 0 ? 0 : - x == 1 ? 1 : - x < 0.5 ? -(Math.Pow(2, 20 * x - 10) * Math.Sin((20 * x - 11.125) * c5)) / 2 : - Math.Pow(2, -20 * x + 10) * Math.Sin((20 * x - 11.125) * c5) / 2 + 1; + x == 1 ? 1 : + x < 0.5 ? -(Math.Pow(2, 20 * x - 10) * Math.Sin((20 * x - 11.125) * c5)) / 2 : + Math.Pow(2, -20 * x + 10) * Math.Sin((20 * x - 11.125) * c5) / 2 + 1; } public static double EaseInBounce(float x)