round

round 函式返回一個最接近給定數字的整數。

語法

round( decimal )

引數

decimal

要四捨五入的十進位制數。

返回值

最接近 decimal 的、小於、大於或等於它的整數。

描述

  • -0.5 四捨五入為負零。0.4 四捨五入為正零。

規範

XPath 1.0 4.4

Gecko 支援情況

支援。