Commit 7f351f1d authored by Michael Ochmann's avatar Michael Ochmann
Browse files

.

parent 321adf06
......@@ -41,8 +41,8 @@ class HeightMap {
addPoint(geoPoint) {
if (geoPoint.constructor.name !== "GeoPoint")
throw new TypeError("an object of type 'GeoPoint' must be passed.");
if (this.points.length > 0 && this.points[0].distance(geoPoint) < 5)
throw new TypeError("an object of type 'GeoPoint' must be p1assed.");
if (this.points.length > 0 && this.points[this.points.length - 1].distance(geoPoint) < 5)
return;
$("#points").html(this.points.length);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment