자바 소수점 처리
1. 소수점 올림, 버림, 반올림 Math.ceil() : 소수점 올림, 정수형 반환 Math.floor() : 소수점 버림, 정수형 반환 Math.round() : 소수점 반올림, 정수형 반환 var n = 123.456; alert(Math.ceil(n)); // 124 alert(Math.round(n)); // 123 n = 123.567; alert(Math.ceil(n)); // 124 alert(Math.floor(n)); // 123 alert(Math.round(n)); // 124 2. 소수점 자리수 표기 toFiexed() : 숫자를 문자열로 변환하면서 지정된 소수점 이하 숫자를 반올림하여 출력한다. toExponential() : 숫자를 문자열로 변환하면서 소수점 앞의 숫자 하나와 ..