MCPcopy Create free account
hub / github.com/egonelbre/exp / CoverageToColor

Function CoverageToColor

linerendering/main.go:96–104  ·  view source on GitHub ↗
(c float)

Source from the content-addressed store, hash-verified

94}
95
96func CoverageToColor(c float) uint8 {
97 if c >= 1 {
98 return 0x00
99 } else if c <= 0 {
100 return 0xFF
101 } else {
102 return 0xFF - uint8(0xFF*c)
103 }
104}
105
106func main() {
107 a := Line{Point{100, 100}, Point{213, 217}, 10}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected