Hi anyone know how to use Math.round (in javascript) but i want to it use in solidity?
Dec 16, 2021, 12:34 AM
You need to implement it yourself.
If your number ends with >=5 - divide on 10 and add 1.
Else divide on 10
If your number ends with >=5 - divide on 10 and add 1.
Else divide on 10
Dec 16, 2021, 12:41 AM
There are no floats in solidity, problem solved
Dec 16, 2021, 3:24 PM