MCPcopy
hub / github.com/fogleman/primitive / clampInt

Function clampInt

primitive/util.go:140–148  ·  view source on GitHub ↗
(x, lo, hi int)

Source from the content-addressed store, hash-verified

138}
139
140func clampInt(x, lo, hi int) int {
141 if x < lo {
142 return lo
143 }
144 if x > hi {
145 return hi
146 }
147 return x
148}
149
150func minInt(a, b int) int {
151 if a < b {

Callers 8

MutateMethod · 0.85
computeColorFunction · 0.85
DoMoveMethod · 0.85
MutateMethod · 0.85
NewRandomRectangleFunction · 0.85
MutateMethod · 0.85
MutateMethod · 0.85
cropScanlinesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…