A rule for rounding a floating-point number.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
A rule for rounding a floating-point number.
SDK
Framework
case away From Zero
Round to the closest allowed value whose magnitude is greater than or equal to that of the source.
case down
Round to the closest allowed value that is less than or equal to the source.
case to Nearest Or Away From Zero
Round to the closest allowed value; if two values are equally close, the one with greater magnitude is chosen.
case to Nearest Or Even
Round to the closest allowed value; if two values are equally close, the even one is chosen.
case toward Zero
Round to the closest allowed value whose magnitude is less than or equal to that of the source.
case up
Round to the closest allowed value that is greater than or equal to the source.
var hash Value: Int
The hash value.
func hash(into: inout Hasher)
Hashes the essential components of this value by feeding them into the given hasher.
static func != (Floating Point Rounding Rule, Floating Point Rounding Rule) -> Bool
Returns a Boolean value indicating whether two values are not equal.
static func == (Floating Point Rounding Rule, Floating Point Rounding Rule) -> Bool
Returns a Boolean value indicating whether two values are equal.