vendor/transformation-matrix/rotate.js
function rotate(angle, cx, cy) {
    var cosAngle = cos(angle);
    var sinAngle = sin(angle);
    var rotationMatrix = {
        a: cosAngle, c: -sinAngle, e: 0,
        b: sinAngle, d: cosAngle, f: 0
    };
    if ((0, _utils.isUndefined)(cx) || (0, _utils.isUndefined)(cy)) {
        return rotationMatrix;
    }

    return (0, _transform.transform)([(0, _translate.translate)(cx, cy), rotationMatrix, (0, _translate.translate)(-cx, -cy)]);
}
function rotate(angle, cx, cy) {
    var cosAngle = cos(angle);
    var sinAngle = sin(angle);
    var rotationMatrix = {
        a: cosAngle, c: -sinAngle, e: 0,
        b: sinAngle, d: cosAngle, f: 0
    };
    if ((0, _utils.isUndefined)(cx) || (0, _utils.isUndefined)(cy)) {
        return rotationMatrix;
    }

    return (0, _transform.transform)([(0, _translate.translate)(cx, cy), rotationMatrix, (0, _translate.translate)(-cx, -cy)]);
}
function rotate ( angle , cx , cy ) { var cosAngle = cos ( angle ) ; var sinAngle = sin ( angle ) ; var rotationMatrix = { a : cosAngle , c : - sinAngle , e : 0 , b : sinAngle , d : cosAngle , f : 0 } ; if ( ( 0 , _utils . isUndefined ) ( cx ) || ( 0 , _utils . isUndefined ) ( cy ) ) { return rotationMatrix ; } return ( 0 , _transform . transform ) ( [ ( 0 , _translate . translate ) ( cx , cy ) , rotationMatrix , ( 0 , _translate . translate ) ( - cx , - cy ) ] ) ; }
Calculate a rotation matrix
@param angle Angle in radians
@param [cx] If (cx,cy) are supplied the rotate is about this point
@param [cy] If (cx,cy) are supplied the rotate is about this point
@returns {{a: number, b: number, c: number, e: number, d: number, f: number}} Affine matrix *
Calculate a rotation matrix