exponential(precision:explicitPositiveSign:uppercase:)
Creates a custom exponential format with the specified precision value.
Declaration
static func exponential(precision: @autoclosure @escaping () -> Int, explicitPositiveSign: Bool = false, uppercase: Bool = false) -> OSLogFloatFormattingParameters
- precision:
The maximum number of digits to display to the right of the decimal point.
- explicitPositiveSign:
A Boolean value that indicates whether to display a plus (
+) sign in front of positive numbers. - uppercase:
A Boolean value that indicates whether to uppercase letters that are part of the floating-point number. For example, it determines the capitalization of the exponent indicator
ein the number1.0e9, or the letters in special values such asNaNandInf.
Return Value
A custom exponential format for floating-point numbers.