MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / MinNonZero

Function MinNonZero

imath/imath.go:5–14  ·  view source on GitHub ↗
(a, b int)

Source from the content-addressed store, hash-verified

3import "math"
4
5func MinNonZero(a, b int) int {
6 switch {
7 case a == 0:
8 return b
9 case b == 0:
10 return a
11 }
12
13 return min(a, b)
14}
15
16func Round(a float64) int {
17 return int(math.Round(a))

Callers 5

DownloadSyncMethod · 0.92
cropImageFunction · 0.92
calcSizesMethod · 0.92
limitScaleMethod · 0.92
CalcParamsMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected