MCPcopy Index your code
hub / github.com/gonum/plot / maxDensity

Function maxDensity

labelling.go:252–257  ·  view source on GitHub ↗

maxDensity returns the maximum density score achievable for have and want.

(have, want int)

Source from the content-addressed store, hash-verified

250
251// maxDensity returns the maximum density score achievable for have and want.
252func maxDensity(have, want int) float64 {
253 if have < want {
254 return 1
255 }
256 return 2 - float64(have-1)/float64(want-1)
257}
258
259// unitLegibility returns a default legibility score ignoring label
260// spacing.

Callers 1

talbotLinHanrahanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected