Quiz: Math Functions
Compute the following:
Math.pow(10, 3) |
1000.0 | |
Math.sqrt(4) |
2.0 | |
Math.abs(3 - 5) |
2 | 3 = 5 is -2, and the absolute value drops the sign. |
Math.min(300, 255) |
255 | 255 is less than 300 |
Math.max(0, -1) |
0 | 0 is more than -1 |