refactor: migrate resample module (#1351)

* refactor: resampling functionality

* fix: type issues

* fix: reorder polyfills import in index.ts

* refactor: reorder exports in index.ts for consistency
This commit is contained in:
Marc Emmanuel 2026-03-18 17:51:53 +01:00 committed by GitHub
parent 3f9a7702d4
commit f2fc42799b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 601 additions and 417 deletions

View file

@ -234,6 +234,8 @@ class FeatureModule {
const [startCell, featureVertices] = getCellsData(type, firstCell);
const points = clipPoly(
featureVertices.map((vertex: number) => vertices.p[vertex]),
graphWidth,
graphHeight,
);
const area = polygonArea(points); // feature perimiter area
const absArea = Math.abs(rn(area));