Permalink
Browse files

Simplify.

  • Loading branch information...
1 parent e7ea256 commit 131c883c6fe08fa883c26e1a9f7d3646de7fbe0c @jasondavies jasondavies committed Dec 27, 2012
Showing with 9 additions and 11 deletions.
  1. +4 −5 d3.js
  2. +1 −1 d3.min.js
  3. +4 −5 src/geo/centroid.js
View
9 d3.js
@@ -5643,11 +5643,10 @@
}
function d3_geo_centroidLineStart() {
var x0, y0, z0;
- if (d3_geo_centroidDimension !== 1) {
- if (d3_geo_centroidDimension < 1) {
- d3_geo_centroidDimension = 1;
- d3_geo_centroidW = d3_geo_centroidX = d3_geo_centroidY = d3_geo_centroidZ = 0;
- } else return;
+ if (d3_geo_centroidDimension > 1) return;
+ if (d3_geo_centroidDimension < 1) {
+ d3_geo_centroidDimension = 1;
+ d3_geo_centroidW = d3_geo_centroidX = d3_geo_centroidY = d3_geo_centroidZ = 0;
}
d3_geo_centroid.point = function(λ, φ) {
λ *= d3_radians;
View
2 d3.min.js
1 addition, 1 deletion not shown because the diff is too large. Please use a local Git client to view these changes.
View
9 src/geo/centroid.js
@@ -71,11 +71,10 @@ function d3_geo_centroidRingStart() {
function d3_geo_centroidLineStart() {
var x0, y0, z0; // previous point
- if (d3_geo_centroidDimension !== 1) {
- if (d3_geo_centroidDimension < 1) {
- d3_geo_centroidDimension = 1;
- d3_geo_centroidW = d3_geo_centroidX = d3_geo_centroidY = d3_geo_centroidZ = 0;
- } else return;
+ if (d3_geo_centroidDimension > 1) return;
+ if (d3_geo_centroidDimension < 1) {
+ d3_geo_centroidDimension = 1;
+ d3_geo_centroidW = d3_geo_centroidX = d3_geo_centroidY = d3_geo_centroidZ = 0;
}
d3_geo_centroid.point = function(λ, φ) {

0 comments on commit 131c883

Please sign in to comment.