@equinor/videx-map
Version:
Component for Pixi-overlay in Leaflet.
9 lines (8 loc) • 320 B
TypeScript
import Vector2 from '@equinor/videx-vector2';
/**
* Get the center of mass of a polygon.
* @param vertices Vertices of polygon
* @param triangles Triangles of polygon
* @returns Center of mass and mass of polygon
*/
export default function centerOfMass(vertices: Vector2[], triangles: number[]): [Vector2, number];