Last active
March 15, 2019 09:59
-
-
Save manisero/72e396c198ef55e2f4cf3de2d31587df to your computer and use it in GitHub Desktop.
Przebij to, Kazimierczak.
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
public static int CeilingOfDivisionBy( | |
this int value, | |
int divisor) | |
{ | |
var intQuotient = value / divisor; | |
var remainder = value % divisor; | |
return remainder == 0 | |
? intQuotient | |
: intQuotient + 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment