Introduce direction / orientation / position conversion functions

This commit is contained in:
Orestis Floros
2018-09-14 20:18:04 +03:00
committed by Orestis Floros
parent e5c430e419
commit 1e8e4d3e7f
4 changed files with 34 additions and 3 deletions

View File

@ -181,3 +181,15 @@ ssize_t slurp(const char *path, char **buf);
*
*/
orientation_t orientation_from_direction(direction_t direction);
/**
* Convert a direction to its corresponding position.
*
*/
position_t position_from_direction(direction_t direction);
/**
* Convert orientation and position to the corresponding direction.
*
*/
direction_t direction_from_orientation_position(orientation_t orientation, position_t position);