MCPcopy Index your code
hub / github.com/docker/docker-agent / abs

Function abs

pkg/chat/image.go:221–226  ·  view source on GitHub ↗
(x float64)

Source from the content-addressed store, hash-verified

219}
220
221func abs(x float64) float64 {
222 if x < 0 {
223 return -x
224 }
225 return x
226}
227
228// fitDimensions returns new dimensions that fit within maxW×maxH while
229// preserving the aspect ratio of w×h.

Callers 1

FormatDimensionNoteFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected