This commit defines international units (IU) of biological activity,
as well as the biological activity “density” of the current reference
preparation of prolactin, to make it easier to convert prolactin
levels between ng/mL (as preferred in the US) and mIU/L (as preferred
in Australia).
I can’t find a formal term for the relationship between biological
activity and mass in reference preparations, so I’ve chosen “density”
by analogy with linear_density, area_density, etc. For example:
> 256 mIU/L * biological_activity_density of prolactin -> ng/mL
4096/335, approx. 12.22686 nanogram / milliliter (density)
This commit defines some of the more important sex hormones and their
precursors, to make it easier to convert their levels between density
(as preferred in the US) and molar_concentration (as preferred in
Australia) without remembering any formulas. For example:
> 1212 pmol/L * molar_mass of oestradiol -> pg/mL
approx. 330.1334 picogram / milliliter (density)
> 5.9 nmol/L * molar_mass of progesterone -> ng/mL
approx. 1.855361 nanogram / milliliter (density)
> 0.5 nmol/L * molar_mass of testosterone -> ng/dL
approx. 14.42150 nanogram / deciliter (density)
`an_array.into_iter()` currently just works because of the autoref
feature, which then calls `<[T] as IntoIterator>::into_iter`. But
in the future, arrays will implement `IntoIterator`, too. In order
to avoid problems in the future, the call is replaced by `iter()`
which is shorter and more explicit.
Try to parse a function, or attribute, then match the result. This
eliminates the two-step approach: check whether we have a function, then
parse as a function.
We only support a limited set of function, so we may as well put them in an
enum instead of passing around strings. This allows us to simplify match
statements, eliminating the case of unsupported functions.
Like the last, commit, replace the macro calls by putting the macro
arguments into variables and putting the macro body after that.
As we need the exact same match statement in both cases, it is
implemented as a method on `Degree`.
Use a single enum, `Degree`, wherever a temperature scale is referenced.
That way, we can a simplify `Conversion` and `Token`, as well as some
matches.