DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR RUBY
2 decimal places ruby
number = 1.1164 number.round(2) Or sprintf('%.2f', number)
PREVIOUS
NEXT
Tagged:
#decimal
#places
#ruby
ADD COMMENT
Topic
COMMENT
Name
4+2 =
Submit