Float to_s hack for easy sprintf'ing Icon

Float to_s hack for easy sprintf'ing

I really hate using sprintf,

Float to_s hack for easy sprintf'ingOverview

I really hate using sprintf, mainly because i always have to go online
and look up the syntax. I figured i could make that a Little easier.
Now you can print floats with different Precision as easily as:
4.123456.to_s(1) # => "4.1"
4.123456.to_s(3) # => "4.12"
4.123456.to_s(3) # => "4.123"
4.123456.to_s(4) # => "4.1235" (Note the auto rounding from 4.123456)
4.123456.to_s # => "4.123456"

NEW

Fixed some bugs.

Float to_s hack for easy sprintf'ingInformation

Version
N/A
Date
08.13.10
License
Free
Language
English
File Size
N/A
Developer
Category
SubCategory
Operating Systems
Windows ,Linux
System Requirements
No additional system requirements.
Hash Referencing Hack for Ruby Icon
Hash i am playing with has symbols for keys orstrings.
Free
More
MP4Info Icon
MP4Info is a library providing read (and, someday, write) access to MP4 tags.
Free
Random Alphanumeric String Generator Icon
This is a script for ruby.
Free
STIM Icon
STIM is simply a web application for maintaining a to-do list.
Lots of Array methods Icon
This is a script for ruby.
Free
Isefad roguelike game Icon
This is an extensible roguelike game, written in Ruby.
Making if and unless consistent? Icon
I've been thinking why some Ruby constructions are inconsistent.
Free
PNG-24 Alpha support for IE Icon
Get alpha channel on web, that's possible with PNG-24 images and this trick.
Free
Real Target Icon
Find the real target of a symbolic link.
Free
More