MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / clamp

Function clamp

diffusers/examples/community/tiled_upscaling.py:52–53  ·  view source on GitHub ↗
(n, smallest, largest)

Source from the content-addressed store, hash-verified

50
51
52def clamp(n, smallest, largest):
53 return max(smallest, min(n, largest))
54
55
56def clamp_rect(rect: [int], min: [int], max: [int]):

Callers 1

clamp_rectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected