(self, m: pint.quantity.Quantity)
return m.m_as(Units().mile)
Convert meters to kilometers or miles, according to units.
Convert meters to kilometers or miles, according to units.
Convert meters to kilometers or miles according to units .
def m2u(self, m: pint.quantity.Quantity) -> float:
        """Convert meters to kilometers or miles, according to units."""
        if self.units == "metric":
            return m.m_as(Units().km)
        return m.m_as(Units().mile)
def m2u ( self , m : pint . quantity . Quantity ) -> float : if self . units == "metric" : return m . m_as ( Units ( ) . km ) return m . m_as ( Units ( ) . mile )