Math.abs(-1) // 절대값. 결과는 1
Math.sin(1) // sin 값. 결과는 0.841470984807897
Math.cos(1) // cos 값. 결과는 0.54030230586814
Math.tan(1) // tan 값. 결과는 1.5574077246549
Math.log(2) // log 값. 결과는 0.693147180559945
Math.exp(1) // 지수 값. 결과는 2.71828182845905
Math.sqrt(9) // 제곱근 값. 결과는 3
Math.pow(2 , 4) // 거듭제곱 값. 결과는 16
Math.ceil(1.1) // 가까운 정수로 올림 값. 결과는 2
Math.ceil(1.5) // 가까운 정수로 올림 값. 결과는 2
Math.floor(1.2) // 가까운 정수로 내림 값. 결과는 1
Math.floor(1.7) // 가까운 정수로 내림 값. 결과는 1
Math.round(1.2) // 가까운 정수로 반올림 값. 결과는 1
Math.round(1.5) // 가까운 정수로 반올림 값. 결과는 2
Math.max(1 , 2) // 두 정수 중 큰 정수값. 결과는 2
Math.min(1 , 2) // 두 정수 중 작은 정수값. 결과는 1
Math.sin(1) // sin 값. 결과는 0.841470984807897
Math.cos(1) // cos 값. 결과는 0.54030230586814
Math.tan(1) // tan 값. 결과는 1.5574077246549
Math.log(2) // log 값. 결과는 0.693147180559945
Math.exp(1) // 지수 값. 결과는 2.71828182845905
Math.sqrt(9) // 제곱근 값. 결과는 3
Math.pow(2 , 4) // 거듭제곱 값. 결과는 16
Math.ceil(1.1) // 가까운 정수로 올림 값. 결과는 2
Math.ceil(1.5) // 가까운 정수로 올림 값. 결과는 2
Math.floor(1.2) // 가까운 정수로 내림 값. 결과는 1
Math.floor(1.7) // 가까운 정수로 내림 값. 결과는 1
Math.round(1.2) // 가까운 정수로 반올림 값. 결과는 1
Math.round(1.5) // 가까운 정수로 반올림 값. 결과는 2
Math.max(1 , 2) // 두 정수 중 큰 정수값. 결과는 2
Math.min(1 , 2) // 두 정수 중 작은 정수값. 결과는 1
View Comments,
Trackbacks
댓글을 달아 주세요