us_customary.nbt 657 B

1234567891011121314151617181920212223242526
  1. ### US customary units
  2. @aliases(inches, in: short)
  3. unit inch: Length = 0.0254 meter
  4. @aliases(feet, ft: short)
  5. unit foot: Length = 0.3048 meter
  6. assert_eq(1 foot, 12 inches, 0.001 inch) # TODO: move those assertions somewhere else
  7. @aliases(yards, yd: short)
  8. unit yard: Length = 0.9144 meter
  9. assert_eq(1 yard, 3 feet, 0.001 foot)
  10. @aliases(miles, mi: short)
  11. unit mile: Length = 1609.344 meter
  12. assert_eq(1 mile, 1760 yard, 0.001 yard)
  13. @aliases(gallons, gal: short)
  14. unit gallon: Volume = 0.003785411784 meter^3
  15. assert_eq(1 gallon, 231 inch^3, 0.001 inch^3)
  16. @aliases(fathoms)
  17. unit fathom: Length = 2 yard
  18. @aliases(furlongs)
  19. unit furlong: Length = 220 yard