mileage_to_yard¶
- pyrcs.converter.mileage_to_yard(mileage)[source]¶
Converts mileages to yards.
- Parameters:
mileage (float | int | str) – The mileage (used by Network Rail).
- Returns:
The corresponding yards.
- Return type:
int
Examples:
>>> from pyrcs.converter import mileage_to_yard >>> yards_dat = mileage_to_yard(mileage='0.0396') >>> yards_dat 396 >>> yards_dat = mileage_to_yard(mileage=0.0396) >>> yards_dat 396 >>> yards_dat = mileage_to_yard(mileage=1.0396) >>> yards_dat 2156