Skip to content

Instantly share code, notes, and snippets.

@mbeltagy
Created June 1, 2019 08:57
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 mbeltagy/9ac50b19cb9a4ccdbbcb9982163b424d to your computer and use it in GitHub Desktop.
Save mbeltagy/9ac50b19cb9a4ccdbbcb9982163b424d to your computer and use it in GitHub Desktop.
Julia rounding up or down to the nearest integer mulitple
round_up(x,m::Integer)=ceil(Int,x/m).*m
round_down(x,m::Integer)=floor(Int,x/m).*m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment