MCPcopy Index your code
hub / github.com/fogleman/nes / coord

Method coord

ui/texture.go:86–92  ·  view source on GitHub ↗
(index int)

Source from the content-addressed store, hash-verified

84}
85
86func (t *Texture) coord(index int) (x, y, dx, dy float32) {
87 x = float32(index%textureDim) / textureDim
88 y = float32(index/textureDim) / textureDim
89 dx = 1.0 / textureDim
90 dy = dx * 240 / 256
91 return
92}
93
94func (t *Texture) load(path string) int {
95 index := t.lru()

Callers 1

LookupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected