/* (non-Javadoc)
@see org.joml.Vector4dc#mul(double, org.joml.Vector4d)
4209
public Vector4d mul(double scalar, Vector4d dest) {
        dest.x = x * scalar;
        dest.y = y * scalar;
        dest.z = z * scalar;
        dest.w = w * scalar;
        return dest;
    }
433456
public static BigDecimal mul(Number v1, Number v2) {
		return mul(new Number[] { v1, v2 });
	}
72668
func (m1 Mat3x4) Mul(c float32) Mat3x4 {
	return Mat3x4{m1[0] * c, m1[1] * c, m1[2] * c, m1[3] * c, m1[4] * c, m1[5] * c, m1[6] * c, m1[7] * c, m1[8] * c, m1[9] * c, m1[10] * c, m1[11] * c}
}
1178145
public Vector3i mul(int x, int y, int z) {
        return mul(x, y, z, thisOrNew());
    }
373077
public static INDArray mul(INDArray x, INDArray y, INDArray z, int... dimensions) {
        if(dimensions == null || dimensions.length == 0) {
            validateShapesNoDimCase(x,y,z);
            return Nd4j.getExecutioner().exec(new OldMulOp(x,y,z));
        }

        return Nd4j.getExecutioner().exec(new BroadcastMulOp(x,y,z,dimensions));
    }
201065
public Vector4i mul(int scalar, Vector4i dest) {
        dest.x = x * scalar;
        dest.y = y * scalar;
        dest.z = z * scalar;
        dest.w = w * scalar;
        return dest;
    }
179836
public Vector4d mul(Matrix4fc mat, Vector4d dest) {
        if ((mat.properties() & Matrix4fc.PROPERTY_AFFINE) != 0)
            return mulAffine(mat, dest);
        return mulGeneric(mat, dest);
    }
1196670
func (vec *T) Mul(v *T) *T {
	vec[0] *= v[0]
	vec[1] *= v[1]
	vec[2] *= v[2]
	return vec
}
954431
public Vector3f mul(Vector3fc v, Vector3f dest) {
        dest.x = x * v.x();
        dest.y = y * v.y();
        dest.z = z * v.z();
        return dest;
    }
817114
public Vector3i mul(Vector3ic v) {
        return mul(v.x(), v.y(), v.z(), thisOrNew());
    }
551376
private static void mult(int[] s1, int s1Len, int[] s2, int s2Len, int[] dst) {
        for (int i = 0; i < s1Len; i++) {
            long v = s1[i] & LONG_MASK;
            long p = 0L;
            for (int j = 0; j < s2Len; j++) {
                p += (dst[i + j] & LONG_MASK) + v * (s2[j] & LONG_MASK);
                dst[i + j] = (int) p;
                p >>>= 32;
            }
            dst[i + s2Len] = (int) p;
        }
    }
1250621
public Vector3d mul(Vector3fc v, Vector3d dest) {
        dest.x = x * v.x();
        dest.y = y * v.y();
        dest.z = z * v.z();
        return dest;
    }
1148778
func (v1 Vec3) Mul(c float32) Vec3 {
	return Vec3{v1[0] * c, v1[1] * c, v1[2] * c}
}
1052954
@Override
    public double[] mult(double[] source, double[] target) {
        if (target == null || target.length < 3) {
            target = new double[3];
        }
        if (source == target) {
            throw new RuntimeException("The source and target vectors used in Matrix3D.mult() cannot be identical.");
        }
        if (target.length == 3) {
            target[0] = m00 * source[0] + m01 * source[1] + m02 * source[2] + m03;
            target[1] = m10 * source[0] + m11 * source[1] + m12 * source[2] + m13;
            target[2] = m20 * source[0] + m21 * source[1] + m22 * source[2] + m23;
            //double w = m30*source[0] + m31*source[1] + m32*source[2] + m33;
            //if (w != 0 && w != 1) {
            //  target[0] /= w; target[1] /= w; target[2] /= w;
            //}
        } else if (target.length > 3) {
            target[0] = m00 * source[0] + m01 * source[1] + m02 * source[2] + m03 * source[3];
            target[1] = m10 * source[0] + m11 * source[1] + m12 * source[2] + m13 * source[3];
            target[2] = m20 * source[0] + m21 * source[1] + m22 * source[2] + m23 * source[3];
            target[3] = m30 * source[0] + m31 * source[1] + m32 * source[2] + m33 * source[3];
        }
        return target;
    }
292904
public Vector mul(double b) {
        Vector result = new Vector(size);
        int i;
        for (i = 0; i < size; i++)
            result.vector[i] = vector[i] * b;
        return result;
    }
144577
private static final long10 mul(long10 xy, long10 x, long10 y) {
		/* sahn0:
		 * Using local variables to avoid class access.
		 * This seem to improve performance a bit...
		 */
		long
			x_0=x._0,x_1=x._1,x_2=x._2,x_3=x._3,x_4=x._4,
			x_5=x._5,x_6=x._6,x_7=x._7,x_8=x._8,x_9=x._9;
		long
			y_0=y._0,y_1=y._1,y_2=y._2,y_3=y._3,y_4=y._4,
			y_5=y._5,y_6=y._6,y_7=y._7,y_8=y._8,y_9=y._9;
		long t;
		t = (x_0*y_8) + (x_2*y_6) + (x_4*y_4) + (x_6*y_2) +
			(x_8*y_0) + 2 * ((x_1*y_7) + (x_3*y_5) +
					(x_5*y_3) + (x_7*y_1)) + 38 *
			(x_9*y_9);
		xy._8 = (t & ((1 << 26) - 1));
		t = (t >> 26) + (x_0*y_9) + (x_1*y_8) + (x_2*y_7) +
			(x_3*y_6) + (x_4*y_5) + (x_5*y_4) +
			(x_6*y_3) + (x_7*y_2) + (x_8*y_1) +
			(x_9*y_0);
		xy._9 = (t & ((1 << 25) - 1));
		t = (x_0*y_0) + 19 * ((t >> 25) + (x_2*y_8) + (x_4*y_6)
				+ (x_6*y_4) + (x_8*y_2)) + 38 *
			((x_1*y_9) + (x_3*y_7) + (x_5*y_5) +
			 (x_7*y_3) + (x_9*y_1));
		xy._0 = (t & ((1 << 26) - 1));
		t = (t >> 26) + (x_0*y_1) + (x_1*y_0) + 19 * ((x_2*y_9)
				+ (x_3*y_8) + (x_4*y_7) + (x_5*y_6) +
				(x_6*y_5) + (x_7*y_4) + (x_8*y_3) +
				(x_9*y_2));
		xy._1 = (t & ((1 << 25) - 1));
		t = (t >> 25) + (x_0*y_2) + (x_2*y_0) + 19 * ((x_4*y_8)
				+ (x_6*y_6) + (x_8*y_4)) + 2 * (x_1*y_1)
				+ 38 * ((x_3*y_9) + (x_5*y_7) +
						(x_7*y_5) + (x_9*y_3));
		xy._2 = (t & ((1 << 26) - 1));
		t = (t >> 26) + (x_0*y_3) + (x_1*y_2) + (x_2*y_1) +
			(x_3*y_0) + 19 * ((x_4*y_9) + (x_5*y_8) +
					(x_6*y_7) + (x_7*y_6) +
					(x_8*y_5) + (x_9*y_4));
		xy._3 = (t & ((1 << 25) - 1));
		t = (t >> 25) + (x_0*y_4) + (x_2*y_2) + (x_4*y_0) + 19 *
			((x_6*y_8) + (x_8*y_6)) + 2 * ((x_1*y_3) +
								 (x_3*y_1)) + 38 *
			((x_5*y_9) + (x_7*y_7) + (x_9*y_5));
		xy._4 = (t & ((1 << 26) - 1));
		t = (t >> 26) + (x_0*y_5) + (x_1*y_4) + (x_2*y_3) +
			(x_3*y_2) + (x_4*y_1) + (x_5*y_0) + 19 *
			((x_6*y_9) + (x_7*y_8) + (x_8*y_7) +
			 (x_9*y_6));
		xy._5 = (t & ((1 << 25) - 1));
		t = (t >> 25) + (x_0*y_6) + (x_2*y_4) + (x_4*y_2) +
			(x_6*y_0) + 19 * (x_8*y_8) + 2 * ((x_1*y_5) +
					(x_3*y_3) + (x_5*y_1)) + 38 *
			((x_7*y_9) + (x_9*y_7));
		xy._6 = (t & ((1 << 26) - 1));
		t = (t >> 26) + (x_0*y_7) + (x_1*y_6) + (x_2*y_5) +
			(x_3*y_4) + (x_4*y_3) + (x_5*y_2) +
			(x_6*y_1) + (x_7*y_0) + 19 * ((x_8*y_9) +
					(x_9*y_8));
		xy._7 = (t & ((1 << 25) - 1));
		t = (t >> 25) + xy._8;
		xy._8 = (t & ((1 << 26) - 1));
		xy._9 += (t >> 26);
		return xy;
	}
1209085
public Vector4f mul(float scalar, Vector4f dest) {
        dest.x = x * scalar;
        dest.y = y * scalar;
        dest.z = z * scalar;
        dest.w = w * scalar;
        return dest;
    }