Java Math Tutorial
math functions
| abs() | Absolute value of number |
| ceil() | Lowest higher double value of a number |
| floor() | Highest lower double value of a number |
| floorDiv() | Highest lower long value of the algebraic quotient |
| round() | rounding to nearest integer |
| random() | randome number generator |
| min() | minimum of two input numbers |
| max() | maximum of two input numbers |
| sqrt() | Square root of input number |
| exp() | Euler's number e raised to the power |
| log() | Natural logarithm with base e |
| log10() | Natural logarithm with base 10 |
| log1p() | Natural logarithm of number + 1 |
| pow() | one number raised to the power of another number |
Math.PI is a constant used in trigonometric calculations.
System.out.println(Math.PI); //3.141592653589793
« Java
This article is written by plus2net.com team.
plus2net.com