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

Function Shrink

imath/imath.go:40–46  ·  view source on GitHub ↗
(a int, shrink float64)

Source from the content-addressed store, hash-verified

38}
39
40func Shrink(a int, shrink float64) int {
41 if a == 0 {
42 return 0
43 }
44
45 return Round(float64(a) / shrink)
46}
47
48func ShrinkToEven(a int, shrink float64) int {
49 if a == 0 {

Callers 2

scaleOnLoadMethod · 0.92

Calls 1

RoundFunction · 0.85

Tested by

no test coverage detected