Use === and !== for comparisons with 0

This commit is contained in:
Tom Payne
2013-05-28 16:07:48 +02:00
parent c0cfc7872e
commit 11672db967
6 changed files with 6 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ ol.geom.squaredDistanceToSegment = function(coordinate, segment) {
var v = segment[0];
var w = segment[1];
var l2 = ol.coordinate.squaredDistance(v, w);
if (l2 == 0) {
if (l2 === 0) {
return ol.coordinate.squaredDistance(coordinate, v);
}
var t = ((coordinate[0] - v[0]) * (w[0] - v[0]) +