MCPcopy Create free account
hub / github.com/atraczyk/2d-engine / worldToTile

Function worldToTile

engine/src/utils.cpp:34–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34Point worldToTile(Vector2 position, Vector2 size) {
35 return Point((int)(position.x / size.x), (int)(position.y / size.y));
36}
37
38bool isInRange(int x, int min, int max) { return (x >= min && x <= max); }
39

Callers 3

drawMethod · 0.85
resolveItemCollisionsMethod · 0.85

Calls 1

PointClass · 0.85

Tested by

no test coverage detected