From e230358ede1a27681d63f08c6d73f457068e5642 Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Tue, 3 Jun 2025 09:23:27 -0600 Subject: [PATCH] add jsdoc --- src/geo/polygon.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/geo/polygon.js b/src/geo/polygon.js index ca606429..4e1982be 100644 --- a/src/geo/polygon.js +++ b/src/geo/polygon.js @@ -1190,7 +1190,13 @@ class Polygon { - forEachPoint(fn, close, start) { + /** + * calls function for each point in this polygon + * @param {Function} fn to call for each point + * @param {boolean} [close=true] whether to close the loop (last point to first) + * @param {number} [start=0] starting index + */ + forEachPoint(fn, close, start) { let index = start || 0, points = this.points, length = points.length,