Math.sqrt() / Math.abs()
Square root, powers, and absolute value.
Syntax
Math.sqrt(x) Math.pow(x,y) Math.abs(x)
Description
Java's Math class can be used directly: sqrt (square root), pow (power), abs (absolute value), round (rounding).
Example
Loading editor…
Expected output
9.0 1024.0 5
When to use?
Geometry, statistics, exponential calculations.