Created
March 19, 2022 08:49
-
-
Save zadeviggers/d50bf1fb6c044ce1d3f51a2e83f88f84 to your computer and use it in GitHub Desktop.
Ease in-out one-liner function in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def easeInOutQuad(x: int | float) -> int | float: | |
return 2 * x * x if x < 0.5 else 1 - pow(-2 * x + 2, 2) / 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment