aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/node/dynamic_codegen/route_guide/route_guide_server.js
diff options
context:
space:
mode:
Diffstat (limited to 'examples/node/dynamic_codegen/route_guide/route_guide_server.js')
-rw-r--r--examples/node/dynamic_codegen/route_guide/route_guide_server.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/node/dynamic_codegen/route_guide/route_guide_server.js b/examples/node/dynamic_codegen/route_guide/route_guide_server.js
index f9028e860d..3819c092eb 100644
--- a/examples/node/dynamic_codegen/route_guide/route_guide_server.js
+++ b/examples/node/dynamic_codegen/route_guide/route_guide_server.js
@@ -122,7 +122,7 @@ function getDistance(start, end) {
var deltalon = lon2-lon1;
var a = Math.sin(deltalat/2) * Math.sin(deltalat/2) +
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));
return R * c;
}