poly2d/p2d_attrib.c (p2d_is_cw): check that the angle isn't NaN

Been had by this a little too often ...
This commit is contained in:
Werner Almesberger 2015-01-19 02:59:43 -03:00
parent 155cfa3d44
commit 385bd601a6
1 changed files with 1 additions and 0 deletions

View File

@ -72,6 +72,7 @@ bool p2d_is_cw(const struct p2d *p)
v = v->next;
}
while (v != p->v);
assert(!isnan(a)); /* require -std=c99 or -std=gnu99 */
return a < 0;
}