Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 608902c907 Checkpoint test refactoring. 2013-03-13 23:21:23 -07:00
Mike Bostock a3bb93a749 Fix vows clobbering our custom asserts. 2013-03-05 09:01:18 -08:00
Jason Davies b9bf5302b4 Add test case for tiny Polygon area. 2013-02-05 21:35:58 +00:00
Jason Davies 9c3ad8f53b Optimise d3.geo.area.
This incorporates two enhancements:

1. A simpler formulation for the area of a spherical triangle with one
   vertex at the south pole.
2. Instead of calling atan2 for every point, we use the identity:
     ∑ arg(z) = arg(∏ z),
   where z is a complex number, and only call atan2 once for each
   polygon, instead opting for a cheaper complex number multiplication
   for each point.

This is around 3x faster than the old implementation as measured by the
included benchmark.
2013-01-31 17:34:05 +00:00
Jason Davies 7dfdcda0b2 d3.geo.area: fix holes. 2012-12-10 12:01:36 +00:00
Jason Davies a9e47f3b8a d3.geo.area: improve handling of tiny polygons. 2012-12-09 20:46:14 +00:00
Jason Davies e0c91c1e27 d3.geo.area: return positive areas. 2012-12-09 20:32:01 +00:00
Jason Davies 7860b0d31e Add d3.geo.area.
See #941.
2012-12-09 19:42:05 +00:00