## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

## APIs

 `public class Math` `double` `abs(double a)` absolute value of `a` `double` `max(double a, double b)` maximum of `a` and `b` `double` `min(double a, double b)` minimum of `a` and `b` Note 1: `abs()`, `max()`, and `min()` are defined also for `int`, `long`, and `float`. `double` `sin(double theta)` sine of `theta` `double` `cos(double theta)` cosine of `theta` `double` `tan(double theta)` tangent of `theta` Note 2: Angles are expressed in radians. Use `toDegrees()` and `toRadians()` to convert. Note 3: Use `asin()`, `acos()`, and `atan()` for inverse functions. `double` `exp(double a)` exponential (e`a`) `double` `log(double a)` natural log (loge `a`, or ln `a`) `double` `pow(double a, double b)` raise `a` to the `b`th power (`a``b`) `long` `round(double a)` round `a` to the nearest integer `double` `random() ...`

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required