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

Function IsValidDirection

src/direction_func.h:32–35  ·  view source on GitHub ↗

* Checks if an integer value is a valid Direction * * @param d The value to check * @return True if the value belongs to a Direction, else false */

Source from the content-addressed store, hash-verified

30 * @return True if the value belongs to a Direction, else false
31 */
32inline bool IsValidDirection(Direction d)
33{
34 return d < DIR_END;
35}
36
37/**
38 * Checks if an integer value is a valid Axis

Callers 8

TileIndexDiffCByDirFunction · 0.85
TileOffsByDirFunction · 0.85
ReverseDirFunction · 0.85
DirDifferenceFunction · 0.85
ChangeDirFunction · 0.85
DirToDiagDirFunction · 0.85
IsDiagonalDirectionFunction · 0.85
TrackDirectionToTrackdirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected