mileage_num_to_str¶
- pyrcs.converter.mileage_num_to_str(mileage)[source]¶
Converts numerical-type Network Rail mileage to string-type one.
- Parameters:
mileage (float | None) – The numerical-type mileage data.
- Returns:
The corresponding string-type mileage in the form of <miles>.<yards>.
- Return type:
str
Examples:
>>> from pyrcs.converter import mileage_num_to_str >>> mileage_str = mileage_num_to_str(mileage=0.0396) >>> mileage_str '0.0396' >>> mileage_str = mileage_num_to_str(mileage=None) >>> mileage_str ''