From e275a679a1fb9377dd1a74329420ce6e95a03da3 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 29 Dec 2017 21:34:10 +0100 Subject: Small doc fixes Signed-off-by: pacien --- include/common/error.h | 2 +- include/morpher/morphing.h | 7 +++++-- include/morpher/trianglemap.h | 10 +++------- include/painter/canvas.h | 4 ++-- include/painter/color.h | 18 +++++++++--------- 5 files changed, 20 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/common/error.h b/include/common/error.h index 22c2630..69104cb 100644 --- a/include/common/error.h +++ b/include/common/error.h @@ -13,7 +13,7 @@ #define OUT_OF_MEMORY_ERROR "Out of memory" /** - * Function: rage quit + * Function: rage_quit * Logs the supplied error message to stderr before exiting the program with an error status code. * * Parameters: diff --git a/include/morpher/morphing.h b/include/morpher/morphing.h index 028cd87..48c33b4 100644 --- a/include/morpher/morphing.h +++ b/include/morpher/morphing.h @@ -26,17 +26,20 @@ typedef struct { } Morphing; /** - * Function: morphing_init + * Function: morphing_create * Initialises a morphing. * * Parameters: * width - coordinate matrix width in pixels * height - coordinate matrix height in pixels + * + * Returns: + * The created morphing, dynamically allocated */ Morphing *morphing_create(IntVector width, IntVector height); /** - * Function: morphing_free + * Function: morphing_destroy * Frees any resources allocated to a morphing. * * Parameters: diff --git a/include/morpher/trianglemap.h b/include/morpher/trianglemap.h index 3dc5f96..735be2f 100644 --- a/include/morpher/trianglemap.h +++ b/include/morpher/trianglemap.h @@ -29,12 +29,10 @@ typedef struct _TriangleMap { * Creates a TriangleMap, instantiating it on the heap. * * Parameters: - * vertex1 - first vertex - * vertex2 - second vertex - * vertex3 - third vertex + * vi - the vertices, positively oriented * * Returns: - * A pointer to the newly created triangle + * A pointer to the newly created triangle, dynamically allocated */ TriangleMap *trianglemap_create(CartesianMapping v1, CartesianMapping v2, CartesianMapping v3); @@ -87,9 +85,7 @@ int trianglemap_find_common_edge(TriangleMap *t, TriangleMap *neighbor); * * Parameters: * *t - the triangle to modify - * *n1 - first neighbour - * *n2 - second neighbour - * *n3 - third neighbour + * *ni - the neighbours * *next - linear neighbour */ void trianglemap_set_neighbors(TriangleMap *t, TriangleMap *n1, TriangleMap *n2, TriangleMap *n3, TriangleMap *next); diff --git a/include/painter/canvas.h b/include/painter/canvas.h index ac278ff..51a7dc9 100644 --- a/include/painter/canvas.h +++ b/include/painter/canvas.h @@ -26,7 +26,7 @@ typedef struct { * height - the height in pixels * * Returns: - * The initialised canvas + * The initialised canvas, dynamically allocated */ Canvas *canvas_create(IntVector width, IntVector height); @@ -38,7 +38,7 @@ Canvas *canvas_create(IntVector width, IntVector height); * *fpath - path to the base image file * * Returns: - * The initialised canvas + * The initialised canvas, dynamically allocated */ Canvas *canvas_create_from_image(const char *fpath); diff --git a/include/painter/color.h b/include/painter/color.h index ea41faf..4a97f50 100644 --- a/include/painter/color.h +++ b/include/painter/color.h @@ -32,28 +32,28 @@ typedef union { /** * Function: color_equals - * Compares the supplied colors. + * Compares the supplied colours. * * Parameters: - * c1 - the first color - * c2 - the second color + * c1 - the first colour + * c2 - the second colour * * Returns: - * T(c1 is the same color as c2) + * T(c1 is the same colour as c2) */ bool color_equals(Color c1, Color c2); /** * Function: color_blend - * Blends two colors. + * Blends two colours. * * Parameters: - * origin - the first color - * target - the second color - * distance - the distance from the first color + * origin - the first colour + * target - the second colour + * distance - the distance from the first colour * * Returns: - * The blended color + * The blended colour */ Color color_blend(Color origin, Color target, TimeVector distance); -- cgit v1.2.3