MCPcopy Index your code
hub / github.com/fogleman/Minecraft / tex_coord

Function tex_coord

main.py:53–60  ·  view source on GitHub ↗

Return the bounding vertices of the texture square.

(x, y, n=4)

Source from the content-addressed store, hash-verified

51
52
53def tex_coord(x, y, n=4):
54 """ Return the bounding vertices of the texture square.
55
56 """
57 m = 1.0 / n
58 dx = x * m
59 dy = y * m
60 return dx, dy, dx + m, dy, dx + m, dy + m, dx, dy + m
61
62
63def tex_coords(top, bottom, side):

Callers 1

tex_coordsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected