Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
40
func
Shrink(a int, shrink float64) int {
41
if
a == 0 {
42
return
0
43
}
44
45
return
Round(float64(a) / shrink)
46
}
47
48
func
ShrinkToEven(a int, shrink float64) int {
49
if
a == 0 {
Callers
2
defaultProcessingOptions
Method · 0.92
scaleOnLoad
Method · 0.92
Calls
1
Round
Function · 0.85
Tested by
no test coverage detected