Skip to content

Commit

Permalink
fix: refine types for matrix helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
msand committed Oct 5, 2019
1 parent cecde7d commit 7a3f867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/elements/Shape.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 7a3f867

Please sign in to comment.