Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions Source/sweep.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
*/

#include <assert.h>
#include <float.h>
#include <stddef.h>
#include <setjmp.h> /* longjmp */

Expand Down Expand Up @@ -605,11 +606,14 @@ static int CheckForIntersect( TESStesselator *tess, ActiveRegion *regUp )
DebugEvent( tess );

tesedgeIntersect( dstUp, orgUp, dstLo, orgLo, &isect );
/* The following properties are guaranteed: */
assert( MIN( orgUp->t, dstUp->t ) <= isect.t );
assert( isect.t <= MAX( orgLo->t, dstLo->t ));
assert( MIN( dstLo->s, dstUp->s ) <= isect.s );
assert( isect.s <= MAX( orgLo->s, orgUp->s ));
/*
* The following properties are guaranteed (with a little wiggle-room to
* account for loss of precision if the values are subnormal.)
*/
assert( MIN( orgUp->t, dstUp->t ) <= isect.t + FLT_MIN);
assert( isect.t <= MAX( orgLo->t, dstLo->t ) + FLT_MIN);
assert( MIN( dstLo->s, dstUp->s ) <= isect.s + FLT_MIN);
assert( isect.s <= MAX( orgLo->s, orgUp->s ) + FLT_MIN);

if( VertLeq( &isect, tess->event )) {
/* The intersection point lies slightly to the left of the sweep line,
Expand Down