root/lib/utils.rb @ fdc29eca
b689e231 | Marc Dequènes (Duck) | def mm_to_cm(length)
|
|
return if length.nil? or length == ""
|
|||
length /= 10
|
|||
(length.to_i == length) ? length.to_i : length
|
|||
end
|
|||
def cm_to_mm(length)
|
|||
return if length.nil? or length == ""
|
|||
(length.to_f * 10).to_i
|
|||
end
|