Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chrxh/alien
/ correctIntPosition
Function
correctIntPosition
source/EngineInterface/SpaceCalculator.cpp:34–37 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
32
namespace
33
{
34
void correctIntPosition(IntVector2D& pos, IntVector2D const& worldSize)
35
{
36
pos = {((pos.x % worldSize.x) + worldSize.x) % worldSize.x, ((pos.y % worldSize.y) + worldSize.y) % worldSize.y};
37
}
38
39
}
40
Callers
1
correctPosition
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected