js round down to int code example
Example 1: round down the number javascript
+3.5 => +3.0
-3.5 => -4.0
+3.5 => +3.0 using Math.floor()
-3.5 => -3.0 using Math.ceil()
Example 2: calculate surface of a circle round to the nearest integer javascript
Math.round(Math.PI * radius * radius)