MCPcopy Create free account
hub / github.com/B33pBeeps/redthread / ScreenX

Function ScreenX

internal/app/notes.go:75–77  ·  view source on GitHub ↗

ScreenX / ScreenY convert a world cell to screen (no bob applied).

(worldX, zoom int)

Source from the content-addressed store, hash-verified

73
74// ScreenX / ScreenY convert a world cell to screen (no bob applied).
75func ScreenX(worldX, zoom int) int {
76 return int(float32(worldX)*zoomScale(zoom) + 0.5)
77}
78
79func ScreenY(worldY, zoom int) int { return ScreenX(worldY, zoom) }
80

Callers 4

ScreenYFunction · 0.85
EffectiveXMethod · 0.85
ScreenRectMethod · 0.85
PosMethod · 0.85

Calls 1

zoomScaleFunction · 0.85

Tested by

no test coverage detected