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

Function ShrinkToEven

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

Source from the content-addressed store, hash-verified

46}
47
48func ShrinkToEven(a int, shrink float64) int {
49 if a == 0 {
50 return 0
51 }
52
53 return RoundToEven(float64(a) / shrink)
54}
55
56func NonZero[T ~int | ~float32 | ~float64](a, b T) T {
57 if a != 0 {

Callers 1

calcPositionFunction · 0.92

Calls 1

RoundToEvenFunction · 0.85

Tested by

no test coverage detected