Round to the closest allowed value whose magnitude is less than or equal to that of the source.
- Xcode 8.0+
- Swift Standard Library
The following example shows the results of rounding numbers using this rule:
This rule is equivalent to the C
trunc function and implements the
round operation defined by the IEEE 754 specification.