Calculates the unit price based on the number of units and total price.
Optional
pass true to allow -ve values for resulted unit price
true
calcPrice(BigInt(2e6), BigInt(1e5), 6, 6) // 50000n Copy
calcPrice(BigInt(2e6), BigInt(1e5), 6, 6) // 50000n
Calculates the unit price based on the number of units and total price.