소숫점 연산 시 소숫점의 반올림과 올림 그리고 버림 함수 입니다.
기본적으로 수학 연산과 관련된 Math Class를 이용하면 됩니다.
Math.Round([double type Value]); // 소숫점 첫째 자리 반올림 Math.Ceiling([double type Value]);// 소숫점 첫째 자리 올림 Math.Truncate([double type Value]);// 소숫점 첫째 자리 버림 Math.Round([double type Value], 2); // 소숫점 둘째 자리 반올림
너무 간단해서 뭐 설명을 추가적으로 할 필요는 없을 거 같네요.
댓글