컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
math.round
math.round(numericExpression, decimalPlaces)
설명
가장 가까운 정수 또는 지정된 소수점 이하 자릿수로 반올림된 값을 반환합니다.
매개변수 데이터 유형
NUMBER
반환 유형
NUMBER
코드 샘플
math.round(10.7) // returns 11
math.round(1.2567, 2) // returns 1.25
math.round(0-10.7) // returns -11
math.round(0-1.2) // returns -1
math.round(4) // returns 4, math.round(integer) returns the integer
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-01-23(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-01-23(UTC)"],[[["`math.round` function rounds a numeric value to the nearest integer or a specified number of decimal places."],["The function supports `NUMBER` as the input data type and returns a `NUMBER` type value."],["If no decimal places are specified, the function rounds to the nearest whole number."],["Negative values can be used and will be rounded accordingly to the nearest negative whole number or to the specified negative decimal place."],["The function is available within the context of `Search` as described in the documentation."]]],[]]