1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #7228: Round °F temperature to one decimal place

This commit is contained in:
royreznik
2021-09-20 02:44:40 -07:00
parent 713e79c1a9
commit 030c573037
3 changed files with 4 additions and 4 deletions

View File

@ -409,7 +409,7 @@ export function createElement<
* @returns Degrees in Fahrenheit.
*/
export function cToF(celsius: number): number {
return celsius * (9 / 5) + 32;
return Math.round((celsius * (9 / 5) + 32 + Number.EPSILON) * 10) / 10;
}
/**