I\'m looking for a more elegant way to create bounded limiters for numbers, primarily to be used in setters. There are plenty of techniques for determining whether a value falls
This is Apple's own approach, taken from this sample code:
func clamp(value: T, minimum: T, maximum: T) -> T { return min(max(value, minimum), maximum) }