Discussion 解説
The following example shows the results of rounding numbers using this rule: 以下の例は、この規則を使っての数の丸めの結果を示します:
(5.2).rounded(.awayFromZero)
// 6.0
(5.5).rounded(.awayFromZero)
// 6.0
(-5.2).rounded(.awayFromZero)
// -6.0
(-5.5).rounded(.awayFromZero)
// -6.0