Calculate a scaling matrix
@param sx Scaling on axis x
@param [sy = sx] Scaling on axis y (default sx)
@returns {{a: number, b: number, c: number, e: number, d: number, f: number}} Affine matrix
180378
function scale(sx) {
    var sy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;

    if ((0, _utils.isUndefined)(sy)) sy = sx;
    return {
        a: sx, c: 0, e: 0,
        b: 0, d: sy, f: 0
    };
}
332948
public Matrix4f scaleAround(float factor, float ox, float oy, float oz, Matrix4f dest) {
        return scaleAround(factor, factor, factor, ox, oy, oz, dest);
    }
823767
public static void scale( double alpha , DMatrix6 a ) {
        a.a1 *= alpha;
        a.a2 *= alpha;
        a.a3 *= alpha;
        a.a4 *= alpha;
        a.a5 *= alpha;
        a.a6 *= alpha;
    }
141494
function(x) {
            
            if (x == null) return this.decompose(this.mtx).translateX;
            
            return new Matrix(this.mtx && this.mtx.translate(x,0));
        }
345146
public T scale( double val ) {
        T ret = createLike();
        ops.scale(mat,val,ret.getMatrix());
        return ret;
    }
451490
public static void scale( double alpha , DMatrix4 a ) {
        a.a1 *= alpha;
        a.a2 *= alpha;
        a.a3 *= alpha;
        a.a4 *= alpha;
    }
1257166
def scale(scaleAmt):
        
        if not isinstance(scaleAmt, Vector3):
            raise ValueError("scaleAmt must be a Vector3")

        ma4 = Matrix4((scaleAmt.x, 0, 0, 0),
                      (0, scaleAmt.y, 0, 0),
                      (0, 0, scaleAmt.z, 0),
                      (0, 0, 0, 1))
        return ma4
1292340
public static void scale( double alpha , DMatrix2x2 a ) {
        a.a11 *= alpha; a.a12 *= alpha;
        a.a21 *= alpha; a.a22 *= alpha;
    }
593370
public static double calculateScaledResidual(double[][] A, double[] x, double[] b){
		DoubleMatrix2D AMatrix = DoubleFactory2D.dense.make(A); 
		DoubleMatrix1D xVector = DoubleFactory1D.dense.make(x);
		DoubleMatrix1D bVector = DoubleFactory1D.dense.make(b);
		return calculateScaledResidual(AMatrix, xVector, bVector);
	}
505090
function(o, relative) {
    // get target in case of the fx module, otherwise reference this
    var target = this
      , matrix

    // act as a getter
    if (typeof o !== 'object') {
      // get current matrix
      matrix = new SVG.Matrix(target).extract()

      return typeof o === 'string' ? matrix[o] : matrix
    }

    // get current matrix
    matrix = new SVG.Matrix(target)

    // ensure relative flag
    relative = !!relative || !!o.relative

    // act on matrix
    if (o.a != null) {
      matrix = relative ?
        // relative
        matrix.multiply(new SVG.Matrix(o)) :
        // absolute
        new SVG.Matrix(o)

    // act on rotation
    } else if (o.rotation != null) {
      // ensure centre point
      ensureCentre(o, target)

      // apply transformation
      matrix = relative ?
        // relative
        matrix.rotate(o.rotation, o.cx, o.cy) :
        // absolute
        matrix.rotate(o.rotation - matrix.extract().rotation, o.cx, o.cy)

    // act on scale
    } else if (o.scale != null || o.scaleX != null || o.scaleY != null) {
      // ensure centre point
      ensureCentre(o, target)

      // ensure scale values on both axes
      o.scaleX = o.scale != null ? o.scale : o.scaleX != null ? o.scaleX : 1
      o.scaleY = o.scale != null ? o.scale : o.scaleY != null ? o.scaleY : 1

      if (!relative) {
        // absolute; multiply inversed values
        var e = matrix.extract()
        o.scaleX = o.scaleX * 1 / e.scaleX
        o.scaleY = o.scaleY * 1 / e.scaleY
      }

      matrix = matrix.scale(o.scaleX, o.scaleY, o.cx, o.cy)

    // act on skew
    } else if (o.skewX != null || o.skewY != null) {
      // ensure centre point
      ensureCentre(o, target)

      // ensure skew values on both axes
      o.skewX = o.skewX != null ? o.skewX : 0
      o.skewY = o.skewY != null ? o.skewY : 0

      if (!relative) {
        // absolute; reset skew values
        var e = matrix.extract()
        matrix = matrix.multiply(new SVG.Matrix().skew(e.skewX, e.skewY, o.cx, o.cy).inverse())
      }

      matrix = matrix.skew(o.skewX, o.skewY, o.cx, o.cy)

    // act on flip
    } else if (o.flip) {
      matrix = matrix.flip(
        o.flip
      , o.offset == null ? target.bbox()['c' + o.flip] : o.offset
      )

    // act on translate
    } else if (o.x != null || o.y != null) {
      if (relative) {
        // relative
        matrix = matrix.translate(o.x, o.y)
      } else {
        // absolute
        if (o.x != null) matrix.e = o.x
        if (o.y != null) matrix.f = o.y
      }
    }

    return this.attr('transform', matrix)
  }
432724
public void scale(double s, Vector3d v1) {
        x = s * v1.x;
        y = s * v1.y;
        z = s * v1.z;
    }
1351337
def is_affine_mat44(mat):
    """"""

    # Ensure scale is uniform
    if not (mat.data[0][0] == mat.data[1][1] == mat.data[2][2]):
        return False

    # Ensure row [3] is 0, 0, 0, 1
    return (mat.data[0][3] == 0 and
            mat.data[1][3] == 0 and
            mat.data[2][3] == 0 and
            mat.data[3][3] == 1)
297917
public Matrix4x3f scaleLocal(float x, float y, float z, Matrix4x3f dest) {
        if ((properties & PROPERTY_IDENTITY) != 0)
            return dest.scaling(x, y, z);
        float nm00 = x * m00;
        float nm01 = y * m01;
        float nm02 = z * m02;
        float nm10 = x * m10;
        float nm11 = y * m11;
        float nm12 = z * m12;
        float nm20 = x * m20;
        float nm21 = y * m21;
        float nm22 = z * m22;
        float nm30 = x * m30;
        float nm31 = y * m31;
        float nm32 = z * m32;
        dest.m00 = nm00;
        dest.m01 = nm01;
        dest.m02 = nm02;
        dest.m10 = nm10;
        dest.m11 = nm11;
        dest.m12 = nm12;
        dest.m20 = nm20;
        dest.m21 = nm21;
        dest.m22 = nm22;
        dest.m30 = nm30;
        dest.m31 = nm31;
        dest.m32 = nm32;
        dest.properties = properties & ~(PROPERTY_IDENTITY | PROPERTY_TRANSLATION | PROPERTY_ORTHONORMAL);
        return dest;
    }
13058
public Matrix3f scale(float xyz, Matrix3f dest) {
        return scale(xyz, xyz, xyz, dest);
    }
1304808
private SimpleMatrix computeAffineH( List<AssociatedPair> observations ,
										 DMatrixRMaj H , DMatrixRMaj Hzero ) {

		SimpleMatrix A = new SimpleMatrix(observations.size(),3);
		SimpleMatrix b = new SimpleMatrix(A.numRows(),1);

		Point2D_F64 c = new Point2D_F64();
		Point2D_F64 k = new Point2D_F64();

		for( int i = 0; i < observations.size(); i++ ) {
			AssociatedPair a = observations.get(i);

			GeometryMath_F64.mult(Hzero, a.p1, k);
			GeometryMath_F64.mult(H,a.p2,c);

			A.setRow(i,0,k.x,k.y,1);
			b.set(i,0,c.x);
		}

		SimpleMatrix x = A.solve(b);

		SimpleMatrix Ha = SimpleMatrix.identity(3);
		Ha.setRow(0,0,x.getDDRM().data);

		return Ha;
	}
635515
public void scale(float sx, float sy) {
		this.sx = this.sx * sx;
		this.sy = this.sy * sy;
		
		checkPush();

		predraw();
		GL.glScalef(sx, sy, 1);
		postdraw();
	}
1281289
function(sx, sy) {
            this.m[0] *= sx;
            this.m[1] *= sx;
            this.m[2] *= sy;
            this.m[3] *= sy;
            return this;
        }