Skip to content

Commit 8e96fe2

Browse files
committed
NumericTextStyles's format style now rounds towards zero.
1 parent 764c2f2 commit 8e96fe2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/NumericTextStyles/Style.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public struct _NumericTextStyle<Format: NumericTextFormat>: DiffableTextStyle {
4444
//=------------------------------------------------------------------------=
4545

4646
@inlinable var format: Format {
47-
adapter.format
47+
adapter.format.rounded(.towardZero)
4848
}
4949

5050
@inlinable var scheme: Scheme {
@@ -100,7 +100,7 @@ extension NumericTextStyle {
100100
//=------------------------------------------------------------------------=
101101

102102
@inlinable public func interpret(_ value: Value) -> Commit<Value> {
103-
let style = format.precision(precision.active()).rounded(.towardZero)
103+
let style = format.precision(precision.active())
104104
var value = value
105105
//=--------------------------------------=
106106
// MARK: Autocorrect

0 commit comments

Comments
 (0)