fix: temperature limit float

This commit is contained in:
Gabe
2025-10-15 00:59:32 +08:00
parent 2033ff6777
commit a095a2c01c
4 changed files with 18 additions and 7 deletions

View File

@@ -15,7 +15,7 @@ export const limitNumber = (num, min = 0, max = 100) => {
return number;
};
export const limitFloat = (num, min = 0, max = 100) => {
export const limitFloat = (num, min = 0.0, max = 100.0) => {
const number = parseFloat(num);
if (Number.isNaN(number) || number < min) {
return min;