mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-22 18:16:27 +02:00
poly2d (p2d_contains_point): use "bool" instead of "int"
This commit is contained in:
parent
cba417fc37
commit
3cc284d9c1
@ -34,13 +34,15 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#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 {
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user