티스토리 뷰

Java/Class

[java.lang] Math

MinChyang 2018. 1. 5. 10:16

Math Class



◎ Define

- Math Class는 수학에서 자주 사용되는 상수들과 함수들을 구현해 놓은 Class이다.


- Math Class의 모든 Method는 Class Method(static method)이므로, 객체를 따로 생성하지 않고 바로 사용할 수 있다.



◎ Math Class Field


Field

Brief description

Math.E

오일러의 수라 불리며, 자연로그(natural logarithms)의 밑(base) 값으로 약 2.71828을 의미

Math.PI

원의 원주를 지름으로 나눈 비율(원주율) 값으로 약 3.14159를 의미



◎ Math Class Method


Method

Brief description

static Math.abs(num)

num의 절대값 반환

static Math.acos(num)

num의 아크코사인값 반환

static Math.asin(num)

num의 아크사인 반환

static Math.stan(num)

num의 아크탄젠트 반환

static Math.stan2(num)

num의 x축과 주어진 점이 이루는 각도 반환

static Math.ceil(num)

num의 올림값 반환

static Math.cos(num)

num의 코사인값 반환

static Math.exp(num)

e의 거듭제곱값 반환

static Math.floor(num)

num의 내림값 반환

 static Math.log(num)

num의 자연로그를 반환

static Math.max(num, num2)

num과 num2 중 큰 쪽을 반환

static Math.min(num, num2)

num과 num2 중 작은 쪽을 반환

 static Math.pow(num, num2)

num의 num2승을 반환

static Math.random()

난수를 반환 (0이상 1미만의 double값 반환)

static Math.round(num)

 num의 반올림값 반환

static Math.sin(num)

num의 사인값 반환

 static Math.sqrt(num)

num의 제곱근값을 반환

 static Math.tan(num)

num의 탄젠트값 반환

 static Math.toRadians(num)

num(각도)을 라디안으로 변환 후 반환

static Math.toDegrees(num)

num(라디안)을 각도로 변환 후 반환

 Object Method

Object Method



◎ Explanation


① 수학적 공식


1. 수학적 Class 라는 것 외에 Math Class에 대해 딱히 설명 할 것은 없다.


2. 앞으로 차근차근 하나하나 수학적 공식에 대해서 기록 하자.



'Java > Class' 카테고리의 다른 글

[java.lang] System  (0) 2018.01.05
[java.lang] Wrapper  (0) 2018.01.05
[java.lang] StringBuilder  (0) 2018.01.04
[java.lang] StringBuffer  (0) 2018.01.04
[java.lang] String  (0) 2018.01.03
댓글
Notice
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
Link
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
글 보관함