Created
June 23, 2021 15:56
-
-
Save mlhoutel/e0d7913af4b49013f7aca887bc8cc676 to your computer and use it in GitHub Desktop.
This file contains 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
inline int positive_modulo(int i, int n) { | |
return (i % n + n) % n; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment