ClosedRange

struct ClosedRange<Bound : Comparable>
  • Clamp value to the range

    Declaration

    Swift

    public func clamp(_ value: Bound) -> Bound

    Parameters

    value

    Value to clamp