Instance Propertyswift 6.0.3FoundationInternationalization->Swift
roundingRule
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
var roundingRule: FloatingPointRoundingRule
var roundingRule: FloatingPointRoundingRule
ss8DurationV30FoundationInternationalizationE16UnitsFormatStyleV29FractionalPartDisplayStrategyV12roundingRules021FloatingPointRoundingL0Ovp
What are these?6ODV8
import Swift
import FoundationInternationalization
struct FractionalPartDisplayStrategy
Specifies how a duration is displayed if it cannot be represented exactly with the allowed units.
@frozen struct Duration
A representation of high precision time.
struct UnitsFormatStyle
A FormatStyle
that displays a duration as a list of duration units, such as “2 hours, 43 minutes, 26 seconds” in English.
enum FloatingPointRoundingRule
A rule for rounding a floating-point number.
init(from decoder: any Decoder) throws
init<Range>(lengthLimits: Range, roundingRule: FloatingPointRoundingRule = .toNearestOrEven, roundingIncrement: Double? = nil) where Range : RangeExpression, Range.Bound == Int
Displays the remaining part as the fractional part of the smallest unit.
static var hide: Duration.UnitsFormatStyle.FractionalPartDisplayStrategy { get }
Excludes the remaining part.
static func hide(rounded: FloatingPointRoundingRule = .toNearestOrEven) -> Duration.UnitsFormatStyle.FractionalPartDisplayStrategy
Excludes the remaining part with the specified rounding rule.
static func show(length: Int, rounded rule: FloatingPointRoundingRule = .toNearestOrEven, increment: Double? = nil) -> Duration.UnitsFormatStyle.FractionalPartDisplayStrategy
Displays the remaining part as the fractional part of the smallest unit.
var maximumLength: Int
var minimumLength: Int
var roundingIncrement: Double?