Calculates units based on the total price and number of units.
Optional
calcUnits(BigInt(1e5), BigInt(2e6)) // 50000000000000000ncalcUnits('1000', '1200', 2, 2) // 83n === 0.83 * 10^2 Copy
calcUnits(BigInt(1e5), BigInt(2e6)) // 50000000000000000ncalcUnits('1000', '1200', 2, 2) // 83n === 0.83 * 10^2
Calculates units based on the total price and number of units.