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

Function Scale

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

Source from the content-addressed store, hash-verified

22}
23
24func Scale(a int, scale float64) int {
25 if a == 0 {
26 return 0
27 }
28
29 return Round(float64(a) * scale)
30}
31
32func ScaleToEven(a int, scale float64) int {
33 if a == 0 {

Callers 4

CalcCropSizeFunction · 0.92
calcSizesMethod · 0.92
saveImageToFitBytesFunction · 0.92
scaleOnLoadMethod · 0.92

Calls 1

RoundFunction · 0.85

Tested by

no test coverage detected