자바 튜토리얼

자바 홈 자바 소개 자바 시작하기 자바 구문 자바 주석 자바 변수 자바 데이터 유형 자바 타입 캐스팅 자바 연산자 자바 문자열 자바 수학 자바 부울 자바 If...Else 자바 스위치 자바 while 루프 자바 For 루프 자바 중단/계속 자바 배열

자바 메소드

자바 메소드 자바 메소드 매개변수 자바 메소드 오버로딩 자바 범위 자바 재귀

자바 클래스

자바 OOP 자바 클래스/객체 자바 클래스 속성 자바 클래스 메소드 자바 생성자 자바 수정자 자바 캡슐화 자바 패키지 / API 자바 상속 자바 다형성 자바 내부 클래스 자바 추상화 자바 인터페이스 자바 열거형 자바 사용자 입력 자바 날짜 자바 배열 목록 자바 링크드리스트 자바 해시맵 자바 해시셋 자바 반복자 자바 래퍼 클래스 자바 예외 자바 정규식 자바 스레드 자바 람다

자바 파일 처리

자바 파일 자바 파일 생성/쓰기 자바 읽기 파일 자바 삭제 파일

자바 방법

두 개의 숫자 더하기

자바 참조

자바 키워드 자바 문자열 메소드 자바 수학 메소드

자바 예제

자바 예제 자바 컴파일러 자바 연습 자바 퀴즈 자바 인증서


자바 수학 메소드


Java Math 클래스에는 숫자에 대한 수학 작업을 수행할 수 있는 많은 메서드가 있습니다.


모든 수학 방법

모든 수학 방법 목록은 아래 표에서 찾을 수 있습니다.

Method Description Return Type
abs(x) Returns the absolute value of x double|float|int|long
acos(x) Returns the arccosine of x, in radians double
asin(x) Returns the arcsine of x, in radians double
atan(x) Returns the arctangent of x as a numeric value between -PI/2 and PI/2 radians double
atan2(y,x) Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta). double
cbrt(x) Returns the cube root of x double
ceil(x) Returns the value of x rounded up to its nearest integer double
copySign(x, y) Returns the first floating point x with the sign of the second floating point y double
cos(x) Returns the cosine of x (x is in radians) double
cosh(x) Returns the hyperbolic cosine of a double value double
exp(x) Returns the value of Ex double
expm1(x) Returns ex -1 double
floor(x) Returns the value of x rounded down to its nearest integer double
getExponent(x) Returns the unbiased exponent used in x int
hypot(x, y) Returns sqrt(x2 +y2) without intermediate overflow or underflow double
IEEEremainder(x, y) Computes the remainder operation on x and y as prescribed by the IEEE 754 standard double
log(x) Returns the natural logarithm (base E) of x double
log10(x) Returns the base 10 logarithm of x double
log1p(x) Returns the natural logarithm (base E) of the sum of x and 1 double
max(x, y) Returns the number with the highest value double|float|int|long
min(x, y) Returns the number with the lowest value double|float|int|long
nextAfter(x, y) Returns the floating point number adjacent to x in the direction of y double|float
nextUp(x) Returns the floating point value adjacent to x in the direction of positive infinity double|float
pow(x, y) Returns the value of x to the power of y double
random() Returns a random number between 0 and 1 double
round(x) Returns the value of x rounded to its nearest integer int
rint() Returns the double value that is closest to x and equal to a mathematical integer double
signum(x) Returns the sign of x double
sin(x) Returns the sine of x (x is in radians) double
sinh(x) Returns the hyperbolic sine of a double value double
sqrt(x) Returns the square root of x double
tan(x) Returns the tangent of an angle double
tanh(x) Returns the hyperbolic tangent of a double value double
toDegrees(x) Converts an angle measured in radians to an approx. equivalent angle measured in degrees double
toRadians(x) Converts an angle measured in degrees to an approx. angle measured in radians double
ulp(x) Returns the size of the unit of least precision (ulp) of x double|float

참고: 모든 수학 방법은 static.