Created
December 3, 2011 15:27
-
-
Save ssube/1427376 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
uint64_t FlatFactorial(uint64_t input) | |
{ | |
if (input <= 2) return input; | |
uint64_t mult = input - 1; | |
while (mult > 1) | |
{ | |
input *= mult--; | |
} | |
return input; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment