From 5d5a7d6b22156e5bbb9bf6d4f706740af3ca05ac Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 22 Oct 2010 16:33:55 +0200 Subject: [PATCH] _cairo_round: Fix documentation Despite what the comment says, this function rounds halfway cases towards positive infinity. _cairo_round ( 0.5) => floor ( 1.0) => 1.0 _cairo_round (-0.5) => floor ( 0.0) => 0.0 _cairo_round (-1.5) => floor (-1.0) => -1.0 Signed-off-by: Uli Schlachter Signed-off-by: Chris Wilson --- src/cairoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cairoint.h b/src/cairoint.h index 5836101a7..53c87e56c 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -956,7 +956,7 @@ _cairo_restrict_value (double value, double min, double max) } /* C99 round() rounds to the nearest integral value with halfway cases rounded - * away from 0. _cairo_round rounds halfway cases toward negative infinity. + * away from 0. _cairo_round rounds halfway cases toward positive infinity. * This matches the rounding behaviour of _cairo_lround. */ static inline double cairo_const _cairo_round (double r)