fix: refine types for matrix helpers

This commit is contained in:
Mikael Sand
2019-10-05 16:20:19 +03:00
parent cecde7ddd3
commit 7a3f86710c
+2 -2
View File
@@ -83,7 +83,7 @@ export function multiply_matrices(l: Matrix, r: Matrix): Matrix {
return { a, c, e, b, d, f };
}
export function invert({ a, b, c, d, e, f }: Matrix) {
export function invert({ a, b, c, d, e, f }: Matrix): Matrix {
const n = a * d - b * c;
return {
a: d / n,
@@ -202,7 +202,7 @@ export class SVGMatrix implements SVGMatrix {
}
}
export function matrixTransform(matrix: Matrix, point: SVGPoint): Point {
export function matrixTransform(matrix: Matrix, point: Point): Point {
const { a, b, c, d, e, f } = matrix;
const { x, y } = point;
return {