Merge: lib/standard/math: Added round method to floats
authorJean Privat <jean@pryen.org>
Fri, 21 Nov 2014 02:25:20 +0000 (21:25 -0500)
committerJean Privat <jean@pryen.org>
Fri, 21 Nov 2014 02:25:20 +0000 (21:25 -0500)
commit9397b03419101ed69c36ca5732818612d1ebef68
tree08b0aaff1ab53d3d216a7ce9eaef2faf7428a853
parent8bd3911edbd0734ec79a965e41f72f836f4fc6b5
parente015a622e58d748ee9bf2ae90aa62afe03852465
Merge: lib/standard/math: Added round method to floats

Yes, I know, it can be done right now using a simple trick like `1.34.to_i.to_f`, but it seems counter-intuitive to me, why not have a round method in Float (besides, it should be a bit faster) ?

I leave it to you, is it worth it to add this to standard ?

If it is, well +1 and let's merge this :)

Pull-Request: #924
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>