mbostock/d3 — pull request #1013 by jasondavies (2013-01-17 11:04:25+00:00)
Title: 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.