src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

convert.go (303B)


      1 package units
      2 
      3 func InchesToCentimeter(inches float64) float64 {
      4 	return inches * 2.54
      5 }
      6 
      7 func CentimeterToInches(cm float64) float64 {
      8 	return cm / 2.54
      9 }
     10 
     11 func PoundsToKilogram(lbs float64) float64 {
     12 	return lbs * 0.45359237
     13 }
     14 
     15 func KilogramToPounds(kg float64) float64 {
     16 	return kg * 2.20462262185
     17 }