Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
32
func
ScaleToEven(a int, scale float64) int {
33
if
a == 0 {
34
return
0
35
}
36
37
return
RoundToEven(float64(a) * scale)
38
}
39
40
func
Shrink(a int, shrink float64) int {
41
if
a == 0 {
Callers
4
prepareWatermark
Method · 0.92
limitScale
Method · 0.92
calcPosition
Function · 0.92
padding
Method · 0.92
Calls
1
RoundToEven
Function · 0.85
Tested by
no test coverage detected