Instance Method

# round()

Rounds this value to an integral value using “schoolbook rounding.”

## Discussion

The `round()` method uses the `.toNearestOrAwayFromZero` rounding rule, where a value halfway between two integral values is rounded to the one with greater magnitude. The following example rounds several values using this default rule:

To specify an alternative rule for rounding, use the `round(_:)` method instead.

### Rounding Values

`func rounded() -> Float`

Returns this value rounded to an integral value using “schoolbook rounding.”

`func rounded(FloatingPointRoundingRule) -> Float`

Returns this value rounded to an integral value using the specified rounding rule.

`func round(FloatingPointRoundingRule)`

Rounds the value to an integral value using the specified rounding rule.