Re: Miles per hour
Reply #18 –
Oh, there is even a schism over what a ton means, cool.
For now I'm trying only speeds. It's certainly not so easy, because for some unclear reason conversions happen in both directions. There is some infernal kind of internal speed, converted to km/h and back here and there. Why it isn't consistent across the whole program is beyond me.
Take a look:
#define VEHICLE_SPEED_FACTORÂ (80)
#define speed_to_kmh(speed) (((speed)*VEHICLE_SPEED_FACTOR+511) >> 10)
#define kmh_to_speed(speed) (((speed) << 10) / VEHICLE_SPEED_FACTOR)