MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / rotate

Function rotate

game/state/tilemap/pathfinding.cpp:116–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114};
115
116Vec3<int> rotate(Vec3<int> vec, int rotation)
117{
118 switch (rotation)
119 {
120 case 1:
121 return {-vec.y, vec.x, vec.z};
122 case 2:
123 return {-vec.x, -vec.y, vec.z};
124 case 3:
125 return {vec.y, -vec.x, vec.z};
126 default:
127 return vec;
128 }
129}
130
131} // anonymous namespace
132

Callers 4

groupMoveMethod · 0.85
updateMethod · 0.85
QuadMethod · 0.85
drawMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected