<commit_before>/*
 * MelonJS Game Engine
 * Copyright (C) 2011 - 2014, melonJS Team
 * http://www.melonjs.org
 *
 */

(function(window) {

    /**
     * a Matrix2d Object.<br>
     * the identity matrix and parameters position : <br>
     * <img src="images/identity-matrix_2x.png"/>
     * @class
     * @extends Object
     * @memberOf me
     * @constructor
     * @param {Number} a the m1,1 (m11) value in the matrix
     * @param {Number} b the m1,2 (m12) value in the matrix
     * @param {Number} c the m2,1 (m21) value in the matrix
     * @param {Number} d the m2,2 (m12) value in the matrix
     * @param {Number} e The delta x (dx) value in the matrix
     * @param {Number} f The delta x (dy) value in the matrix
     */
    me.Matrix2d = Object.extend(
    /** @scope me.Matrix2d.prototype */    {
    
        /**
         * the m1,1 value in the matrix (a)
         * @public
         * @type Number
         * @name a
         * @memberOf me.Matrix2d
         */
        a : 1,
        
        /**
         * the m1,2 value in the matrix (b)
         * @public
         * @type Number
         * @name b
         * @memberOf me.Matrix2d
         */
        b : 0,

        /**
         * the m2,1 value in the matrix (c)
         * @public
         * @type Number
         * @name c
         * @memberOf me.Matrix2d
         */
        c : 0,

        /**
         * the m2,2 value in the matrix (d)
         * @public
         * @type Number
         * @name d
         * @memberOf me.Matrix2d
         */
        d : 1,

        /**
         * The delta x value in the matrix (e)
         * @public
         * @type Number
         * @name e
         * @memberOf me.Matrix2d
         */
        e : 0,

        /**
         * The delta y value in the matrix (f)
         * @public
         * @type Number
         * @name f
         * @memberOf me.Matrix2d
         */
        f : 0,


        /** @ignore */
        init : function(a, b, c, d, e, f) {
            this.set(a || 1, b || 0, c || 0, d || 1, e || 0, f || 0);    
        },

        /**
         * reset the transformation matrix to the identity matrix (no transformation).<br>
         * the identity matrix and parameters position : <br>
         * <img src="images/identity-matrix_2x.png"/>
         * @name identity
         * @memberOf me.Matrix2d
         * @function
         * @return {me.Matrix2d} this matrix
         */
        identity : function() {
            this.set(1, 0, 0, 1, 0, 0);
            return this;
        },

        /**
         * set the matrix to the specified value
         * @name set
         * @memberOf me.Matrix2d
         * @function
         * @param {Number} a the m1,1 (m11) value in the matrix
         * @param {Number} b the m1,2 (m12) value in the matrix
         * @param {Number} c the m2,1 (m21) value in the matrix
         * @param {Number} d the m2,2 (m22) value in the matrix
         * @param {Number} [e] The delta x (dx) value in the matrix
         * @param {Number} [f] The delta y (dy) value in the matrix
         * @return {me.Matrix2d} this matrix
         */
        set : function(a ,b, c, d, e, f) {
            this.a = a;
            this.b = b;
            this.c = c;
            this.d = d;
            this.e = e || this.e;
            this.f = f || this.f;
            return this;
        },

        /**
         * multiply both matrix
         * @name multiply
         * @memberOf me.Matrix2d
         * @function
         * @param {Number} a the m1,1 (m11) value in the matrix
         * @param {Number} b the m1,2 (m12) value in the matrix
         * @param {Number} c the m2,1 (m21) value in the matrix
         * @param {Number} d the m2,2 (m22) value in the matrix
         * @param {Number} [e] The delta x (dx) value in the matrix
         * @param {Number} [f] The delta y (dy) value in the matrix
         * @return {me.Matrix2d} this matrix
         */
        multiply : function(a, b, c, d, e, f) {
            var a1 = this.a;
            var b1 = this.b;
            var c1 = this.c;
            var d1 = this.d;<commit_msg>Fixed bug in the set function if `e` or `f` are not specified<commit_after>/*
 * MelonJS Game Engine
 * Copyright (C) 2011 - 2014, melonJS Team
 * http://www.melonjs.org
 *
 */

(function(window) {

    /**
     * a Matrix2d Object.<br>
     * the identity matrix and parameters position : <br>
     * <img src="images/identity-matrix_2x.png"/>
     * @class
     * @extends Object
     * @memberOf me
     * @constructor
     * @param {Number} a the m1,1 (m11) value in the matrix
     * @param {Number} b the m1,2 (m12) value in the matrix
     * @param {Number} c the m2,1 (m21) value in the matrix
     * @param {Number} d the m2,2 (m12) value in the matrix
     * @param {Number} e The delta x (dx) value in the matrix
     * @param {Number} f The delta x (dy) value in the matrix
     */
    me.Matrix2d = Object.extend(
    /** @scope me.Matrix2d.prototype */    {
    
        /**
         * the m1,1 value in the matrix (a)
         * @public
         * @type Number
         * @name a
         * @memberOf me.Matrix2d
         */
        a : 1,
        
        /**
         * the m1,2 value in the matrix (b)
         * @public
         * @type Number
         * @name b
         * @memberOf me.Matrix2d
         */
        b : 0,

        /**
         * the m2,1 value in the matrix (c)
         * @public
         * @type Number
         * @name c
         * @memberOf me.Matrix2d
         */
        c : 0,

        /**
         * the m2,2 value in the matrix (d)
         * @public
         * @type Number
         * @name d
         * @memberOf me.Matrix2d
         */
        d : 1,

        /**
         * The delta x value in the matrix (e)
         * @public
         * @type Number
         * @name e
         * @memberOf me.Matrix2d
         */
        e : 0,

        /**
         * The delta y value in the matrix (f)
         * @public
         * @type Number
         * @name f
         * @memberOf me.Matrix2d
         */
        f : 0,


        /** @ignore */
        init : function(a, b, c, d, e, f) {
            this.set(a || 1, b || 0, c || 0, d || 1, e || 0, f || 0);    
        },

        /**
         * reset the transformation matrix to the identity matrix (no transformation).<br>
         * the identity matrix and parameters position : <br>
         * <img src="images/identity-matrix_2x.png"/>
         * @name identity
         * @memberOf me.Matrix2d
         * @function
         * @return {me.Matrix2d} this matrix
         */
        identity : function() {
            this.set(1, 0, 0, 1, 0, 0);
            return this;
        },

        /**
         * set the matrix to the specified value
         * @name set
         * @memberOf me.Matrix2d
         * @function
         * @param {Number} a the m1,1 (m11) value in the matrix
         * @param {Number} b the m1,2 (m12) value in the matrix
         * @param {Number} c the m2,1 (m21) value in the matrix
         * @param {Number} d the m2,2 (m22) value in the matrix
         * @param {Number} [e] The delta x (dx) value in the matrix
         * @param {Number} [f] The delta y (dy) value in the matrix
         * @return {me.Matrix2d} this matrix
         */
        set : function(a ,b, c, d, e, f) {
            this.a = a;
            this.b = b;
            this.c = c;
            this.d = d;
            this.e = typeof(e) !== 'undefined' ? e : this.e;
            this.f = typeof(f) !== 'undefined' ? f : this.f;
            return this;
        },

        /**
         * multiply both matrix
         * @name multiply
         * @memberOf me.Matrix2d
         * @function
         * @param {Number} a the m1,1 (m11) value in the matrix
         * @param {Number} b the m1,2 (m12) value in the matrix
         * @param {Number} c the m2,1 (m21) value in the matrix
         * @param {Number} d the m2,2 (m22) value in the matrix
         * @param {Number} [e] The delta x (dx) value in the matrix
         * @param {Number} [f] The delta y (dy) value in the matrix
         * @return {me.Matrix2d} this matrix
         */
        multiply : function(a, b, c, d, e, f) {
            var a1 = this.a;
            var b1 = this.b;
            var c1 = this.c;
            var d1 = this.d;
{'fraction_non_alphanumeric': 0.12210982658959538, 'fraction_numerical': 0.024807321772639692, 'mean_word_length': 1.37082500713674, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '306962', 'n_tokens_mistral': 2721, 'n_tokens_neox': 2621, 'n_words': 907}