0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 21:53:27 -05:00
penpot-exporter-figma-plugin/plugin-src/utils/applyMatrixToPoint.ts

7 lines
235 B
TypeScript
Raw Normal View History

2024-04-15 02:48:03 -05:00
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]
];
};