Skip to content

Commit

Permalink
Fix inOutExpo easing
Browse files Browse the repository at this point in the history
  • Loading branch information
finnvoor authored Jan 8, 2025
1 parent 4ca722e commit ac59773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/PlaydateKit/Core/Easing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public enum Easing {
case .outExpo:
return x == 1 ? 1 : 1 - powf(2, -10 * x)
case .inOutExpo:
return x == 0 ? 0 : x == 1 ? 1 : x < 0.5 ? powf(2, 20 * x - 10) / 2 : 2 - powf(2, -20 * x + 10) / 2
return x == 0 ? 0 : x == 1 ? 1 : x < 0.5 ? powf(2, 20 * x - 10) / 2 : (2 - powf(2, -20 * x + 10)) / 2
case .inCirc:
return 1 - sqrtf(1 - powf(x, 2))
case .outCirc:
Expand Down

0 comments on commit ac59773

Please sign in to comment.