use core::mixed_units use units::si use units::imperial @name("Unit list") @description("Convert a value to a mixed representation using the provided units.") @example("5500 m |> unit_list([miles, yards, feet, inches])") fn unit_list(units: List, value: D) -> List = _mixed_unit_list(value, units, []) @name("Degrees, minutes, seconds") @description("Convert an angle to a mixed degrees, (arc)minutes, and (arc)seconds representation. Also called sexagesimal degree notation.") @url("https://en.wikipedia.org/wiki/Sexagesimal_degree") @example("46.5858° -> DMS") fn DMS(alpha: Angle) -> List = unit_list([degree, arcminute, arcsecond], alpha) @name("Degrees, decimal minutes") @description("Convert an angle to a mixed degrees and decimal minutes representation.") @url("https://en.wikipedia.org/wiki/Decimal_degrees") @example("46.5858° -> DM") fn DM(alpha: Angle) -> List = unit_list([degree, arcminute], alpha) @name("Feet and inches") @description("Convert a length to a mixed feet and inches representation.") @url("https://en.wikipedia.org/wiki/Foot_(unit)") @example("180 cm -> feet_and_inches") fn feet_and_inches(length: Length) -> List = unit_list([foot, inch], length) @name("Pounds and ounces") @description("Convert a mass to a mixed pounds and ounces representation.") @url("https://en.wikipedia.org/wiki/Pound_(mass)") @example("1 kg -> pounds_and_ounces") fn pounds_and_ounces(mass: Mass) -> List = unit_list([pound, ounce], mass)