Revision c17ca23e
Added by Marc Dequènes almost 15 years ago
- ID c17ca23e9bba5f665a76ebbd2e09c1b191f6cee9
lib/utils.rb | ||
---|---|---|
def mm_to_cm(length)
|
||
return if length.nil? or length == ""
|
||
length /= 10
|
||
length = length.to_f / 10
|
||
(length.to_i == length) ? length.to_i : length
|
||
end
|
||
|
Also available in: Unified diff
[fix] mm_to_cm() util function was buggy and eated floating parts