UNPKG

transformation-matrix

Version:

2d transformation matrix functions written in ES6 syntax. Tree shaking ready!

22 lines (21 loc) 359 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.shear = shear; /** * Calculate a shear matrix * @param shx {number} Shear on axis x * @param shy {number} Shear on axis y * @returns {Matrix} Affine Matrix */ function shear(shx, shy) { return { a: 1, c: shx, e: 0, b: shy, d: 1, f: 0 }; }