Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add Numeric#round
  • Loading branch information
meh committed Dec 26, 2013
1 parent a79052a commit 6deb722
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions opal/corelib/numeric.rb
Expand Up @@ -316,6 +316,10 @@ def pred
`self - 1`
end

def round
`Math.round(self)`
end

def step(limit, step = 1, &block)
return enum_for :step, limit, step unless block

Expand Down

0 comments on commit 6deb722

Please sign in to comment.