diff --git a/poly2d/p2d_contains_point.c b/poly2d/p2d_contains_point.c index d6bd8a3..1a1f24d 100644 --- a/poly2d/p2d_contains_point.c +++ b/poly2d/p2d_contains_point.c @@ -34,13 +34,15 @@ */ +#include + #include "poly2d.h" -int p2d_contains_point(const struct p2d *p, const struct v2d *v) +bool p2d_contains_point(const struct p2d *p, const struct v2d *v) { const struct v2d *j, *i; - int in = 0; + bool in = 0; j = p->v; do { diff --git a/poly2d/poly2d.h b/poly2d/poly2d.h index 023ec51..9cc8e9e 100644 --- a/poly2d/poly2d.h +++ b/poly2d/poly2d.h @@ -1,8 +1,8 @@ /* * poly2d.h - The public face of the 2D Polygon library * - * Written 2012, 2013 by Werner Almesberger - * Copyright 2012, 2013 Werner Almesberger + * Written 2012, 2013, 2015 by Werner Almesberger + * Copyright 2012, 2013, 2015 Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -147,7 +147,7 @@ void p2d_free_all(struct p2d *p); * Returns non-zero if the point is inside or on the simple polygon. */ -int p2d_contains_point(const struct p2d *p, const struct v2d *v); +bool p2d_contains_point(const struct p2d *p, const struct v2d *v); /* * Returns: