Creates a scale matrix.

Type signature

(sx?: number, sy?: number) => {
    a: number;
    c: number;
    e: number;
    b: number;
    d: number;
    f: number;
}

Examples

scale(2, 3);
// ⇒ { a: 2, b: 0, c: 0, d: 3, e: 0, f: 0 }
Try in REPL

Questions

  • How to create a scale matrix?

TypeScript sourceJavaScript source