mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-12-03 10:04:29 +00:00
avoid performing a get on unit stores for each point
This commit is contained in:
1 parent
5dcb93ca5d
commit
9cd87742f0
2 files changed
+42
-12
No files matched your search
@@ -229,6 +229,9 @@ export function getConvertedVelocity(
|
||||
}
|
||||
}
|
||||
|
||||
export function getConvertedTemperature(value: number) {
|
||||
return get(temperatureUnits) === 'celsius' ? value : celsiusToFahrenheit(value);
|
||||
export function getConvertedTemperature(
|
||||
value: number,
|
||||
targetTemperatureUnits = get(temperatureUnits)
|
||||
) {
|
||||
return targetTemperatureUnits === 'celsius' ? value : celsiusToFahrenheit(value);
|
||||
}
|
||||
Reference in new issue
Block a user