Skip to content

Instantly share code, notes, and snippets.

@raven38
Last active August 29, 2015 14:11
Show Gist options
  • Save raven38/81702ba69983d4274712 to your computer and use it in GitHub Desktop.
Save raven38/81702ba69983d4274712 to your computer and use it in GitHub Desktop.
天井関数、割り算の切り上げ

m/nを切り上げる

(m + n - 1) / n

m/nを切り下げる

m / n

m/nを四捨五入する

(m + n / 2) / n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment