PercentageMath
// Maximum percentage factor (100.00%)
uint256 internal constant PERCENTAGE_FACTOR = 1e4;
// Half percentage factor (50.00%)
uint256 internal constant HALF_PERCENTAGE_FACTOR = 0.5e4;percentMul
Test example

Multiplication operation

* maybe show diag of when round down vs round up?
overflow
percentDiv

Division operation

overflow
Last updated