[Math 객체] 수학적 계산을 돕는 Math객체 : max(), min(), ceil(), floor(), round(), abs(), pow(), sqrt(), random(), log(), sin(), cos(), tan()


[Math 객체] 수학적 계산을 돕는 Math객체 : max(), min(), ceil(), floor(), round(), abs(), pow(), sqrt(), random(), log(), sin(), cos(), tan()

Math 객체 자바스크립트 내장 객체 중 수학적 계산을 하는데 도움을 주는 객체. 객체 생성은 없음. Math.메소드(~) Math 객체 메소드 max( n1, n2, .... , nn ) n1부터 nn까지 중 최대값 리턴 min( n1, n2, .... , nn) n1부터 nn까지 중 최소값 리턴 ceil( n ) 소수 첫째자리에서 올림해서 정수로 리턴 floor( n ) 소수 첫째자리에서 내림해서 정수로 리턴 round( n ) 소수 첫째자리에서 반올림해서 정수로 리턴 abs( n ) n 값의 절대값 리턴 pow( n , m ) n의 m승 리턴 sqrt( n ) n의 제곱근 리턴(= √n ) random( ) 0이상 1미만의 무작위 실수를 리턴 0.0은 잘 리턴되지 않음 random() 뒤에 연산자를..


원문링크 : [Math 객체] 수학적 계산을 돕는 Math객체 : max(), min(), ceil(), floor(), round(), abs(), pow(), sqrt(), random(), log(), sin(), cos(), tan()