diff --git a/Sources/Xcore/Swift/PropertyWrappers/Clamping.swift b/Sources/Xcore/Swift/PropertyWrappers/Clamping.swift index 1f84d2b52..efd3952df 100644 --- a/Sources/Xcore/Swift/PropertyWrappers/Clamping.swift +++ b/Sources/Xcore/Swift/PropertyWrappers/Clamping.swift @@ -31,6 +31,6 @@ public struct Clamping { public var wrappedValue: Value { get { value } - set { value = min(max(range.lowerBound, newValue), range.upperBound) } + set { value = newValue.clamped(to: range) } } }