Skip to content

Commit aa2ee01

Browse files
committed
Remove unintentional change to greatCircle.
1 parent abc6541 commit aa2ee01

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

d3.geo.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ d3.geo.greatCircle = function() {
627627
radius = 6371; // Mean radius of Earth, in km.
628628
// TODO: breakAtDateLine?
629629

630-
function greatCircle(d, i, dist) {
630+
function greatCircle(d, i) {
631631
var from = source.call(this, d, i),
632632
to = target.call(this, d, i),
633633
x0 = from[0] * d3_radians,
@@ -638,15 +638,13 @@ d3.geo.greatCircle = function() {
638638
cy0 = Math.cos(y0), sy0 = Math.sin(y0),
639639
cx1 = Math.cos(x1), sx1 = Math.sin(x1),
640640
cy1 = Math.cos(y1), sy1 = Math.sin(y1),
641-
d = dist || Math.acos(sy0 * sy1 + cy0 * cy1 * Math.cos(x1 - x0)),
641+
d = Math.acos(sy0 * sy1 + cy0 * cy1 * Math.cos(x1 - x0)),
642642
sd = Math.sin(d),
643643
f = d / (n - 1),
644644
e = -f,
645645
path = [],
646646
i = -1;
647647

648-
if (d === 0) return [from];
649-
650648
while (++i < n) {
651649
e += f;
652650
var A = Math.sin(d - e) / sd,

d3.geo.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/geo/greatCircle.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ d3.geo.greatCircle = function() {
66
radius = 6371; // Mean radius of Earth, in km.
77
// TODO: breakAtDateLine?
88

9-
function greatCircle(d, i, dist) {
9+
function greatCircle(d, i) {
1010
var from = source.call(this, d, i),
1111
to = target.call(this, d, i),
1212
x0 = from[0] * d3_radians,
@@ -17,15 +17,13 @@ d3.geo.greatCircle = function() {
1717
cy0 = Math.cos(y0), sy0 = Math.sin(y0),
1818
cx1 = Math.cos(x1), sx1 = Math.sin(x1),
1919
cy1 = Math.cos(y1), sy1 = Math.sin(y1),
20-
d = dist || Math.acos(sy0 * sy1 + cy0 * cy1 * Math.cos(x1 - x0)),
20+
d = Math.acos(sy0 * sy1 + cy0 * cy1 * Math.cos(x1 - x0)),
2121
sd = Math.sin(d),
2222
f = d / (n - 1),
2323
e = -f,
2424
path = [],
2525
i = -1;
2626

27-
if (d === 0) return [from];
28-
2927
while (++i < n) {
3028
e += f;
3129
var A = Math.sin(d - e) / sd,

0 commit comments

Comments
 (0)