summaryrefslogtreecommitdiff
path: root/navit/util.c
diff options
context:
space:
mode:
authormvglasow <michael@vonglasow.com>2017-11-17 22:17:09 +0100
committerPierre GRANDIN <pgrandin@users.noreply.github.com>2017-11-17 13:17:09 -0800
commit445697c7f66dadf79abce19c224da404d647ee30 (patch)
tree45dcf0697e12942a70b3d8131984abd776997786 /navit/util.c
parentacba9e675bed05c63c17d2993cc6f05766028696 (diff)
downloadnavit-445697c7f66dadf79abce19c224da404d647ee30.tar.gz
Refactor:route:Improve documentation (#372)
* Refactor:route:Improve documentation Signed-off-by: mvglasow <michael -at- vonglasow.com> * Refactor:core:Refine documentation Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/util.c')
-rw-r--r--navit/util.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/navit/util.c b/navit/util.c
index 2cceae460..79c92379e 100644
--- a/navit/util.c
+++ b/navit/util.c
@@ -709,7 +709,22 @@ void spawn_process_init()
return;
}
-/** Get printable compass direction from an angle. */
+/**
+ * @brief Get printable compass direction from an angle.
+ *
+ * This function supports three different modes:
+ *
+ * In mode 0, the angle in degrees is output as a string.
+ *
+ * In mode 1, the angle is output as a cardinal direction (N, SE etc.).
+ *
+ * In mode 2, the angle is output in analog clock notation (6 o'clock).
+ *
+ * @param buffer Buffer to hold the result string (up to 5 characters, including the terminating null
+ * character, may be required)
+ * @param angle The angle to convert
+ * @param mode The conversion mode, see description
+ */
void
get_compass_direction(char *buffer, int angle, int mode)
{