mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
6 lines
165 B
Swift
6 lines
165 B
Swift
extension Double {
|
|
func clamped(to range: ClosedRange<Double>) -> Double {
|
|
return Swift.min(Swift.max(self, range.lowerBound), range.upperBound)
|
|
}
|
|
}
|