This commit is contained in:
discountry
2025-09-23 01:26:49 +08:00
commit 667ede7ca8
26 changed files with 7836 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
export function toPrice1Decimal(price: number): number {
return Math.floor(price * 10) / 10;
}
export function toQty3Decimal(qty: number): number {
return Math.floor(qty * 1000) / 1000;
}
export function isNearlyZero(value: number, epsilon = 1e-5): boolean {
return Math.abs(value) < epsilon;
}