Method: MetricFu::Generator#round_to_tenths
- Defined in:
- lib/metric_fu/generator.rb
#round_to_tenths(decimal) ⇒ Object
109 110 111 112 |
# File 'lib/metric_fu/generator.rb', line 109 def round_to_tenths(decimal) decimal = 0.0 if decimal.to_s.eql?("NaN") (decimal * 10).round / 10.0 end |