

終止支援通知：在 2025 年 12 月 15 日， AWS 將終止對 的支援 AWS IoT Analytics。2025 年 12 月 15 日之後，您將無法再存取 AWS IoT Analytics 主控台或 AWS IoT Analytics 資源。如需詳細資訊，請參閱[AWS IoT Analytics 終止支援](https://docs.aws.amazon.com/iotanalytics/latest/userguide/iotanalytics-end-of-support.html)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# round(Decimal)
<a name="math-round"></a>

將指定的 `Decimal` 無條件進位至最接近的 `Int`。如果 `Decimal` 與兩個 `Int` 值 (例如，0.5) 等距，則 `Decimal` 會無條件進位。

範例：

`Round(1.2)` = 1

`Round(1.5)` = 2

`Round(1.7)` = 2

`Round(-1.1)` = -1

`Round(-1.5)` = -2


| 引數類型 | 結果 | 
| --- | --- | 
| `Int` | 引數 | 
| `Decimal` | `Decimal` 是要向下捨入到最接近的 `Int`。 | 
| `String` | `Decimal` 是要向下捨入到最接近的 `Int`。如果字串無法轉換為 `Decimal`，則結果為 `Undefined`。 | 
| 其他值 | `Undefined`. | 