Merge pull request #15216 from grpc/jtattermusch-patch-1

Fix bad variable name in route_guide_server.js
pull/15232/head
Jan Tattermusch 7 years ago committed by GitHub
commit 785d20cd14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      examples/node/dynamic_codegen/route_guide/route_guide_server.js

@ -122,7 +122,7 @@ function getDistance(start, end) {
var deltalon = lon2-lon1; var deltalon = lon2-lon1;
var a = Math.sin(deltalat/2) * Math.sin(deltalat/2) + var a = Math.sin(deltalat/2) * Math.sin(deltalat/2) +
Math.cos(lat1) * Math.cos(lat2) * Math.cos(lat1) * Math.cos(lat2) *
Math.sin(dlon/2) * Math.sin(dlon/2); Math.sin(deltalon/2) * Math.sin(deltalon/2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
return R * c; return R * c;
} }

Loading…
Cancel
Save