Skip to content

Commit

Permalink
reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
zmian committed Feb 12, 2024
1 parent 18d46eb commit d4b84b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Xcore/Swift/PropertyWrappers/Clamping.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ public struct Clamping<Value: Comparable> {

public var wrappedValue: Value {
get { value }
set { value = min(max(range.lowerBound, newValue), range.upperBound) }
set { value = newValue.clamped(to: range) }
}
}

0 comments on commit d4b84b2

Please sign in to comment.