Skip to content

Commit 54259ce

Browse files
committed
Rounding down
1 parent c2bc1f7 commit 54259ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LoopFollow/Remote/TRC/BolusView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct BolusView: View {
5252
private func roundedToStep(_ value: Double) -> Double {
5353
guard stepU > 0 else { return value }
5454

55-
let stepped = (value / stepU).rounded(.up) * stepU
55+
let stepped = (value / stepU).rounded(.down) * stepU
5656

5757
let p = pow(10.0, Double(stepFractionDigits))
5858
return (stepped * p).rounded() / p

0 commit comments

Comments
 (0)