mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 08:48:07 +00:00
init
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user