MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IsDiagonalDirection

Function IsDiagonalDirection

src/direction_func.h:290–294  ·  view source on GitHub ↗

* Checks if a given Direction is diagonal. * * @param dir The given direction. * @return True if the direction is diagonal. */

Source from the content-addressed store, hash-verified

288 * @return True if the direction is diagonal.
289 */
290inline bool IsDiagonalDirection(Direction dir)
291{
292 assert(IsValidDirection(dir));
293 return (dir & 1) != 0;
294}
295
296#endif /* DIRECTION_FUNC_H */

Callers 3

UpdateDeltaXYMethod · 0.85
TrainApproachingLineEndFunction · 0.85
UpdateDeltaXYMethod · 0.85

Calls 1

IsValidDirectionFunction · 0.85

Tested by

no test coverage detected