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

Function ScaleToEven

imath/imath.go:32–38  ·  view source on GitHub ↗
(a int, scale float64)

Source from the content-addressed store, hash-verified

30}
31
32func ScaleToEven(a int, scale float64) int {
33 if a == 0 {
34 return 0
35 }
36
37 return RoundToEven(float64(a) * scale)
38}
39
40func Shrink(a int, shrink float64) int {
41 if a == 0 {

Callers 4

prepareWatermarkMethod · 0.92
limitScaleMethod · 0.92
calcPositionFunction · 0.92
paddingMethod · 0.92

Calls 1

RoundToEvenFunction · 0.85

Tested by

no test coverage detected