Revision: 3891
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 30, 2007 09:11 by gangbird
Initial Code
def f_to_dec(f, prec=2,sep='.') f.to_i.to_s+sep+((prec-(post=((f*(10**prec)).to_i%(10**prec)).to_s).size).times do post='0'+post end; post) end
Initial URL
Initial Description
Initial Title
float to a decimal number
Initial Tags
Initial Language
Ruby