0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 13:43:03 -05:00
penpot-exporter-figma-plugin/plugin-src/utils/applyMatrixToPoint.ts
2024-04-15 09:48:03 +02:00

6 lines
235 B
TypeScript

export const applyMatrixToPoint = (matrix: number[][], point: number[]) => {
return [
point[0] * matrix[0][0] + point[1] * matrix[0][1] + matrix[0][2],
point[0] * matrix[1][0] + point[1] * matrix[1][1] + matrix[1][2]
];
};