Skip to content

Commit

Permalink
Simplify winding()
Browse files Browse the repository at this point in the history
  • Loading branch information
behdad committed Aug 6, 2015
1 parent 644c5ba commit 5667ab1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/glyphy-outline.cc
Expand Up @@ -69,8 +69,8 @@ winding (const glyphy_arc_endpoint_t *endpoints,

assert (d != GLYPHY_INFINITY);

area += p0.x*p1.y - p0.y*p1.x;
area -= .5 * d * ((p1.x-p0.x)*(p1.x-p0.x) + (p1.y-p0.y)*(p1.y-p0.y));
area += Vector(p0).cross (Vector(p1));
area -= .5 * d * (Point(p1) - Point(p0)).len2 ();
}
return area < 0;
}
Expand Down

0 comments on commit 5667ab1

Please sign in to comment.