Describe the bug
Sometimes the travel calculator doesn't display the time properly.
To Reproduce
An example where this happens is by using 400 miles with a modern car and 200 miles with a modern car. 400 miles works flawlessly, however for 200 miles, the value for the 8hrs/day travel is way off by showing 12 hours (should be 4 instead).
Describe the bug Sometimes the travel calculator doesn't display the time properly.
To Reproduce An example where this happens is by using 400 miles with a modern car and 200 miles with a modern car. 400 miles works flawlessly, however for 200 miles, the value for the 8hrs/day travel is way off by showing 12 hours (should be 4 instead).
Screenshots
The calculation happens here: https://github.com/SalieriC/SWADE-Immersive-Macros/blob/b4d0f51e9455f99cb41ceef41addc50e77c8d2ff/swim/scripts/swim_modules/travel_calculator.js#L145-L153
I'll need someone good at both: JS and Math to help me with that, I'm clearly not good enough in either for that. 🤣 Any volunteers?