|
@@ -1,26 +1,32 @@
|
|
|
-### US customary units
|
|
|
+# US liquid gallon
|
|
|
+@aliases(gallons, gal: short)
|
|
|
+unit gallon: Volume = 0.003785411784 meter^3
|
|
|
+assert_eq(1 gallon, 231 inch^3, 0.001 inch^3)
|
|
|
|
|
|
-@aliases(inches, in: short)
|
|
|
-unit inch: Length = 0.0254 meter
|
|
|
+# US liquid pint
|
|
|
+@aliases(pints)
|
|
|
+unit pint = 1/8 × gallon
|
|
|
|
|
|
-@aliases(feet, ft: short)
|
|
|
-unit foot: Length = 0.3048 meter
|
|
|
-assert_eq(1 foot, 12 inches, 0.001 inch) # TODO: move those assertions somewhere else
|
|
|
+# US cup
|
|
|
+@aliases(cups)
|
|
|
+unit cup = 1/2 × pint
|
|
|
|
|
|
-@aliases(yards, yd: short)
|
|
|
-unit yard: Length = 0.9144 meter
|
|
|
-assert_eq(1 yard, 3 feet, 0.001 foot)
|
|
|
+# US tablespoon
|
|
|
+@aliases(tablespoons, tbsp)
|
|
|
+unit tablespoon = 1/16 × cup
|
|
|
|
|
|
-@aliases(miles, mi: short)
|
|
|
-unit mile: Length = 1609.344 meter
|
|
|
-assert_eq(1 mile, 1760 yard, 0.001 yard)
|
|
|
+# US teaspoon
|
|
|
+@aliases(teaspoons, tsp)
|
|
|
+unit teaspoon = 1/3 × tablespoon
|
|
|
|
|
|
-@aliases(gallons, gal: short)
|
|
|
-unit gallon: Volume = 0.003785411784 meter^3
|
|
|
-assert_eq(1 gallon, 231 inch^3, 0.001 inch^3)
|
|
|
+# US fluid ounce
|
|
|
+@aliases(fluidounces, floz: short)
|
|
|
+unit fluidounce = 2 tablespoon
|
|
|
|
|
|
-@aliases(fathoms)
|
|
|
-unit fathom: Length = 2 yard
|
|
|
+# US hogshead
|
|
|
+@aliases(hogsheads)
|
|
|
+unit hogshead = 63 gallon
|
|
|
|
|
|
-@aliases(furlongs)
|
|
|
-unit furlong: Length = 220 yard
|
|
|
+# US rod
|
|
|
+@aliases(rods)
|
|
|
+unit rod = 16.5 ft
|