transformation-matrix
Advanced tools
Comparing version 1.15.0 to 1.15.1
{ | ||
"name": "transformation-matrix", | ||
"version": "1.15.0", | ||
"version": "1.15.1", | ||
"description": "2d transformation matrix functions written in ES6 syntax. Tree shaking ready!", | ||
@@ -5,0 +5,0 @@ "main": "./build-commonjs/index.js", |
@@ -150,2 +150,28 @@ declare module 'transformation-matrix' { | ||
declare module 'transformation-matrix/fromTriangles' { | ||
import { Matrix } from 'transformation-matrix'; | ||
import { Point } from 'transformation-matrix'; | ||
/** | ||
* Returns a matrix that transforms a triangle t1 into another triangle t2, or throws an exception if it is impossible. | ||
* @param t1 an array of points containing the three points for the first triangle | ||
* @param t2 an array of points containing the three points for the second triangle | ||
* @returns Affine matrix which transforms t1 to t2 | ||
* @throws Exception if the matrix becomes not invertible | ||
*/ | ||
export function fromTriangles(t1: Array<Array<number>> | Array<Point>, t2: Array<Array<number>> | Array<Point>): Matrix; | ||
} | ||
declare module 'transformation-matrix/smoothMatrix' { | ||
import { Matrix } from 'transformation-matrix'; | ||
/** | ||
* Rounds all elements of the given matrix using the given precision | ||
* @param m a matrix to round | ||
* @param precision precision to use for Math.round. Defaults to 10000000000 (meaning which rounds to the 10th digit after the comma). | ||
* @returns the rounded matrix | ||
*/ | ||
export function smoothMatrix (m : Matrix, precision? : number) : Matrix; | ||
} | ||
declare module 'transformation-matrix' { | ||
@@ -165,2 +191,4 @@ export * from 'transformation-matrix/applyToPoint'; | ||
export * from 'transformation-matrix/translate'; | ||
export * from 'transformation-matrix/fromTriangles'; | ||
export * from 'transformation-matrix/smoothMatrix'; | ||
} |
251753
5921