Math 객체의 fround() 함수는 부동 소수점 숫자를 받아들이고 숫자의 가장 가까운 32비트 단정밀도 부동 소수점 표현을 반환합니다. 주어진 숫자 자체가 정수인 경우 이 함수는 동일한 값을 반환합니다.
구문
구문은 다음과 같습니다.
Math.fround(160.98)
예시
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result = Math.fround(160.98);
document.write("Fround value: "+result);
</script>
</body>
</html> 출력
Fround value: 160.97999572753906