Get the length of a 4-dimensional single-precision vector.

@param x The vector's x component
@param y The vector's y component
@param z The vector's z component
@param w The vector's w component

@return the length squared of the given vector
347485
public static double length(int x, int y, int z, int w) {
        return Math.sqrt(lengthSquared(x, y, z, w));
    }
1258424
public Vector4d add(double x, double y, double z, double w) {
        return add(x, y, z, w, thisOrNew());
    }
22311
public double distance(Vector3dc v) {
    	return distance(v.x(), v.y(), v.z());
    }
348057
public Vector4f add(float x, float y, float z, float w) {
        return add(x, y, z, w, thisOrNew());
    }
348554
public double z(double[] xyz) {
        return cosPhi * sinTheta * xyz[1] + sinPhi * xyz[2] + cosPhi * cosTheta * xyz[0];
    }
975620
public Vector4i add(int x, int y, int z, int w) {
        return add(x, y, z, w, thisOrNew());
    }
419250
public long gridDistance(Vector4ic v) {
        return Math.abs(v.x() - x()) + Math.abs(v.y() - y())  + Math.abs(v.z() - z())  + Math.abs(v.w() - w());
    }
797160
public static double vectorLength(double[] vector) {
        double ret = 0;
        if (vector == null)
            return ret;
        else {
            for (int i = 0; i < vector.length; i++) {
                ret += Math.pow(vector[i], 2);
            }

        }
        return ret;
    }
1288232
public Vector4f set(Vector2ic v, float z, float w) {
    	return set(v.x(), v.y(), z, w);
    }
1109881
public Vector4d set(Vector3dc v, double w) {
        return set(v.x(), v.y(), v.z(), w);
    }
480735
public float distance(float x, float y, float z) {
        float dx = this.x - x;
        float dy = this.y - y;
        float dz = this.z - z;
        return (float) Math.sqrt(dx * dx + dy * dy + dz * dz);
    }
699757
public double dot(Vector4dc v) {
        return dot(v.x(), v.y(), v.z(), v.w());
    }
1300662
public Vector4d set(Vector3fc v, double w) {
        return set(v.x(), v.y(), v.z(), w);
    }
15206
public static double squaredDistance(int[] x, int[] y) {
        if (x.length != y.length) {
            throw new IllegalArgumentException("Input vector sizes are different.");
        }

        double sum = 0.0;
        for (int i = 0; i < x.length; i++) {
            sum += sqr(x[i] - y[i]);
        }

        return sum;
    }
713430
public Vector4f add(float x, float y, float z, float w, Vector4f dest) {
        dest.x = this.x + x;
        dest.y = this.y + y;
        dest.z = this.z + z;
        dest.w = this.w + w;
        return dest;
    }
137932
public Vector4d transformAffine(double x, double y, double z, double w, Vector4d dest) {
        double rx = m00 * x + m10 * y + m20 * z + m30 * w;
        double ry = m01 * x + m11 * y + m21 * z + m31 * w;
        double rz = m02 * x + m12 * y + m22 * z + m32 * w;
        dest.x = rx;
        dest.y = ry;
        dest.z = rz;
        dest.w = w;
        return dest;
    }
1109356
public double distance(Vector3ic v) {
        return distance(v.x(), v.y(), v.z());
    }