Applies matrix transformation to the given vector.

Type signature

({ a, b, c, d, e, f }: {
    a: number;
    c: number;
    e: number;
    b: number;
    d: number;
    f: number;
}, [x, y]: [number, number]) => number[]

Examples

mul(scale(4, 5), [2, 3]);
// ⇒ [8, 15]
Try in REPL

Questions

  • How to apply a matrix transformation to a vector?

TypeScript sourceJavaScript source