Skip to content

Instantly share code, notes, and snippets.

@manisero
Last active March 15, 2019 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manisero/72e396c198ef55e2f4cf3de2d31587df to your computer and use it in GitHub Desktop.
Save manisero/72e396c198ef55e2f4cf3de2d31587df to your computer and use it in GitHub Desktop.
Przebij to, Kazimierczak.
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