Module: Utilities::Measurements

Defined in:
lib/utilities/measurements.rb

Constant Summary

FEET_TO_METERS =
3.048

Class Method Summary (collapse)

Class Method Details

+ (Boolean) feet_equals_meters(feet, meters)

Returns true if values when converted are equal TODO: check to see if the ratio will always be exactly 3.048.

Parameters:

  • feet (Float)
  • meters (Float)

Returns:

  • (Boolean)


10
11
12
13
# File 'lib/utilities/measurements.rb', line 10

def self.feet_equals_meters(feet, meters)
  return true if meters.to_f / feet.to_f == 3.048
  false
end