| @@ -197,31 +197,74 @@ math.createUnit("peopleEaten", { | |||||
| prefixes: "long" | prefixes: "long" | ||||
| }) | }) | ||||
| math.createUnit("barn", { | |||||
| definition: "10e-28 m^2", | |||||
| prefixes: "long" | |||||
| }) | |||||
| math.createUnit("barns", { | |||||
| definition: "10e-28 m^2", | |||||
| prefixes: "long" | |||||
| }) | |||||
| math.createUnit("beardSeconds", { | |||||
| definition: "10 nanometers", | |||||
| prefixes: "long" | |||||
| }) | |||||
| math.createUnit("smoots", { | |||||
| definition: "5.5833333 feet", | |||||
| prefixes: "long" | |||||
| }) | |||||
| math.createUnit("furlongs", { | |||||
| definition: "660 feet", | |||||
| prefixes: "long" | |||||
| }) | |||||
| math.createUnit("nanoacres", { | |||||
| definition: "1e-9 acres", | |||||
| prefixes: "long" | |||||
| }) | |||||
| math.createUnit("barnMegaparsecs", { | |||||
| definition: "barn megaparsec", | |||||
| prefixes: "long" | |||||
| }) | |||||
| math.createUnit("firkins", { | |||||
| definition: "90 lb", | |||||
| prefixes: "long" | |||||
| }) | |||||
| math.createUnit("donkeySeconds", { | |||||
| definition: "250 joules", | |||||
| prefixes: "long" | |||||
| }) | |||||
| const defaultUnits = { | const defaultUnits = { | ||||
| length: { | length: { | ||||
| metric: "meters", | metric: "meters", | ||||
| customary: "feet", | customary: "feet", | ||||
| relative: "stories" | |||||
| relative: "stories", | |||||
| quirky: "smoots" | |||||
| }, | }, | ||||
| area: { | area: { | ||||
| metric: "meters^2", | metric: "meters^2", | ||||
| customary: "feet^2", | customary: "feet^2", | ||||
| relative: "footballFields" | |||||
| relative: "footballFields", | |||||
| quirky: "nanoacres" | |||||
| }, | }, | ||||
| volume: { | volume: { | ||||
| metric: "liters", | metric: "liters", | ||||
| customary: "gallons", | customary: "gallons", | ||||
| relative: "olympicPools" | |||||
| relative: "olympicPools", | |||||
| volume: "barnmegaparsecs" | |||||
| }, | }, | ||||
| mass: { | mass: { | ||||
| metric: "kilograms", | metric: "kilograms", | ||||
| customary: "lbs", | customary: "lbs", | ||||
| relative: "peopleMass" | |||||
| relative: "peopleMass", | |||||
| quirky: "firkins" | |||||
| }, | }, | ||||
| energy: { | energy: { | ||||
| metric: "kJ", | metric: "kJ", | ||||
| customary: "kcal", | customary: "kcal", | ||||
| relative: "peopleEaten" | |||||
| relative: "peopleEaten", | |||||
| quirky: "donkeySeconds" | |||||
| } | } | ||||
| } | } | ||||
| @@ -251,6 +294,11 @@ const unitChoices = { | |||||
| "galaxies", | "galaxies", | ||||
| "universes", | "universes", | ||||
| "multiverses" | "multiverses" | ||||
| ], | |||||
| "quirky": [ | |||||
| "beardSeconds", | |||||
| "smoots", | |||||
| "furlongs" | |||||
| ] | ] | ||||
| }, | }, | ||||
| area: { | area: { | ||||
| @@ -266,6 +314,10 @@ const unitChoices = { | |||||
| ], | ], | ||||
| "relative": [ | "relative": [ | ||||
| "footballFields" | "footballFields" | ||||
| ], | |||||
| "quirky": [ | |||||
| "barns", | |||||
| "nanoacres" | |||||
| ] | ] | ||||
| }, | }, | ||||
| volume: { | volume: { | ||||
| @@ -288,6 +340,9 @@ const unitChoices = { | |||||
| "earthVolumes", | "earthVolumes", | ||||
| "universeVolumes", | "universeVolumes", | ||||
| "multiverseVolumes", | "multiverseVolumes", | ||||
| ], | |||||
| "quirky": [ | |||||
| "barnMegaparsecs" | |||||
| ] | ] | ||||
| }, | }, | ||||
| mass: { | mass: { | ||||
| @@ -308,6 +363,9 @@ const unitChoices = { | |||||
| "buses", | "buses", | ||||
| "earthMass", | "earthMass", | ||||
| "solarmasses" | "solarmasses" | ||||
| ], | |||||
| "quirky": [ | |||||
| "firkins" | |||||
| ] | ] | ||||
| }, | }, | ||||
| energy: { | energy: { | ||||
| @@ -321,6 +379,9 @@ const unitChoices = { | |||||
| ], | ], | ||||
| "relative": [ | "relative": [ | ||||
| "peopleEaten" | "peopleEaten" | ||||
| ], | |||||
| "quirky": [ | |||||
| "donkeySeconds" | |||||
| ] | ] | ||||
| } | } | ||||
| } | } | ||||
| @@ -1969,7 +2030,8 @@ const settingsData = { | |||||
| options: [ | options: [ | ||||
| "metric", | "metric", | ||||
| "customary", | "customary", | ||||
| "relative" | |||||
| "relative", | |||||
| "quirky" | |||||
| ], | ], | ||||
| get value() { | get value() { | ||||
| return config.units; | return config.units; | ||||