Skip to content

Add more prefixes #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/units.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ end
@add_prefixes A (n, μ, u, m, k)
@add_prefixes K (m,)
@add_prefixes cd (m,)
@add_prefixes mol (m,)
@add_prefixes mol (p, n, μ, u, m)

@doc(
"Length in meters. Available variants: `fm`, `pm`, `nm`, `μm` (/`um`), `cm`, `inch`, `dm`, `mm`, `ft`, `km`, `mi`, `Mm`, `Gm`.",
Expand All @@ -83,7 +83,7 @@ end
cd,
)
@doc(
"Amount in moles. Available variant: `mmol`.",
"Amount in moles. Available variant: `pmol`, `nmol`, `μmol` (/`umol`), `mmol`.",
mol,
)

Expand All @@ -106,10 +106,10 @@ end
@add_prefixes J (k,)
@add_prefixes W (m, k, M, G)
@add_prefixes C ()
@add_prefixes V (m, k, M, G)
@add_prefixes V (p, n, μ, u, m, k, M, G)
@add_prefixes F ()
@add_prefixes Ω (m,)
@add_prefixes ohm (m,)
@add_prefixes Ω (n, μ, u, m)
@add_prefixes ohm (n, μ, u, m)
@add_prefixes T ()

# SI derived units
Expand Down Expand Up @@ -138,15 +138,15 @@ end
C,
)
@doc(
"Voltage in Volts. Available variants: `kV`, `MV`, `GV`.",
"Voltage in Volts. Available variants: `pV`, `nV`, `μV` (/`uV`), `mV`, kV`, `MV`, `GV`.",
V,
)
@doc(
"Capacitance in Farads.",
F,
)
@doc(
"Resistance in Ohms. Available variant: `mΩ`. Also available is ASCII `ohm` (with variant `mohm`).",
"Resistance in Ohms. Available variant: `nΩ`, `μΩ` (/`uΩ`), `mΩ`. Also available is ASCII `ohm` (with variants `nohm`, `μohm` (/`uohm`), `mohm`).",
Ω,
)
@doc(
Expand Down Expand Up @@ -180,10 +180,10 @@ end
## Volume
@register_unit L dm^3

@add_prefixes L (m, c, d)
@add_prefixes L (μ, u, m, c, d)

@doc(
"Volume in liters. Available variants: `mL`, `cL`, `dL`.",
"Volume in liters. Available variants: `μL` (/`uL`), `mL`, `cL`, `dL`.",
L,
)

Expand Down