MCPcopy Create free account
hub / github.com/Unpackerr/unpackerr / percent

Function percent

pkg/unpackerr/start.go:402–410  ·  view source on GitHub ↗

Custom percentage procedure for starr apps. Returns an unsigned integer 0-100.

(remaining, total float64)

Source from the content-addressed store, hash-verified

400// Custom percentage procedure for starr apps.
401// Returns an unsigned integer 0-100.
402func percent(remaining, total float64) uint {
403 const oneHundred = 100.0
404
405 if remaining == 0 {
406 return oneHundred
407 }
408
409 return uint(oneHundred - (remaining / total * oneHundred))
410}

Callers 5

checkWhisparrQueueMethod · 0.85
checkLidarrQueueMethod · 0.85
checkSonarrQueueMethod · 0.85
checkRadarrQueueMethod · 0.85
checkReadarrQueueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected