require "z15014am_calcUtils/version" include Math module Z15014amCalcUtils def self.calcBMI(height,weight) puts "Your BMI is " + (weight/(height*height)).to_s end def self.calcDistance(lat1,lon1,lat2,lon2) r = 6378.137; lat1 = lat1 * PI / 180; lon1 = lon2 * PI / 180; lat2 = lat2 * PI / 180; lon2 = lon2 * PI / 180; puts "The Distance is "+(r * acos(sin(lat1) * sin(lat2) + cos(lat1) * cos(lat2) * cos(lon2 - lon1))).to_s+" km"; end end