FileDocCategorySizeDatePackage
Long4.javaAPI DocAndroid 5.1 API9912Thu Mar 12 22:22:42 GMT 2015android.renderscript

Long4

public class Long4 extends Object
Vector version of the basic long type. Provides four long fields packed.

Fields Summary
public long
x
public long
y
public long
z
public long
w
Constructors Summary
public Long4()

    
public Long4(long i)

hide

        this.x = this.y = this.z = this.w = i;
    
public Long4(long x, long y, long z, long w)

        this.x = x;
        this.y = y;
        this.z = z;
        this.w = w;
    
public Long4(Long4 source)

hide

        this.x = source.x;
        this.y = source.y;
        this.z = source.z;
        this.w = source.w;
    
Methods Summary
public voidadd(android.renderscript.Long4 a)

hide
Vector add
param
a

        this.x += a.x;
        this.y += a.y;
        this.z += a.z;
        this.w += a.w;
    
public static android.renderscript.Long4add(android.renderscript.Long4 a, android.renderscript.Long4 b)

hide
Vector add
param
a
param
b
return

        Long4 result = new Long4();
        result.x = a.x + b.x;
        result.y = a.y + b.y;
        result.z = a.z + b.z;
        result.w = a.w + b.w;

        return result;
    
public voidadd(long value)

hide
Vector add
param
value

        x += value;
        y += value;
        z += value;
        w += value;
    
public static android.renderscript.Long4add(android.renderscript.Long4 a, long b)

hide
Vector add
param
a
param
b
return

        Long4 result = new Long4();
        result.x = a.x + b;
        result.y = a.y + b;
        result.z = a.z + b;
        result.w = a.w + b;

        return result;
    
public voidaddAt(int i, long value)

hide
add the vector field value by index
param
i
param
value

        switch (i) {
        case 0:
            x += value;
            return;
        case 1:
            y += value;
            return;
        case 2:
            z += value;
            return;
        case 3:
            w += value;
            return;
        default:
            throw new IndexOutOfBoundsException("Index: i");
        }
    
public voidaddMultiple(android.renderscript.Long4 a, long factor)

hide
Vector add Multiple
param
a
param
factor

        x += a.x * factor;
        y += a.y * factor;
        z += a.z * factor;
        w += a.w * factor;
    
public voidcopyTo(long[] data, int offset)

hide
copy the vector to long array
param
data
param
offset

        data[offset] = (long)(x);
        data[offset + 1] = (long)(y);
        data[offset + 2] = (long)(z);
        data[offset + 3] = (long)(w);
    
public voiddiv(android.renderscript.Long4 a)

hide
Vector division
param
a

        this.x /= a.x;
        this.y /= a.y;
        this.z /= a.z;
        this.w /= a.w;
    
public static android.renderscript.Long4div(android.renderscript.Long4 a, android.renderscript.Long4 b)

hide
Vector division
param
a
param
b
return

        Long4 result = new Long4();
        result.x = a.x / b.x;
        result.y = a.y / b.y;
        result.z = a.z / b.z;
        result.w = a.w / b.w;

        return result;
    
public voiddiv(long value)

hide
Vector division
param
value

        x /= value;
        y /= value;
        z /= value;
        w /= value;
    
public static android.renderscript.Long4div(android.renderscript.Long4 a, long b)

hide
Vector division
param
a
param
b
return

        Long4 result = new Long4();
        result.x = a.x / b;
        result.y = a.y / b;
        result.z = a.z / b;
        result.w = a.w / b;

        return result;
    
public longdotProduct(android.renderscript.Long4 a)

hide
Vector dot Product
param
a
return

        return (long)((x * a.x) + (y * a.y) + (z * a.z) + (w * a.w));
    
public static longdotProduct(android.renderscript.Long4 a, android.renderscript.Long4 b)

hide
Vector dot Product
param
a
param
b
return

        return (long)((b.x * a.x) + (b.y * a.y) + (b.z * a.z) + (b.w * a.w));
    
public longelementSum()

hide
return the element sum of vector
return

        return (long)(x + y + z + w);
    
public longget(int i)

hide
get the vector field value by index
param
i
return

        switch (i) {
        case 0:
            return (long)(x);
        case 1:
            return (long)(y);
        case 2:
            return (long)(z);
        case 3:
            return (long)(w);
        default:
            throw new IndexOutOfBoundsException("Index: i");
        }
    
public longlength()

hide
get vector length
return

        return 4;
    
public voidmod(android.renderscript.Long4 a)

hide
Vector Modulo
param
a

        this.x %= a.x;
        this.y %= a.y;
        this.z %= a.z;
        this.w %= a.w;
    
public static android.renderscript.Long4mod(android.renderscript.Long4 a, android.renderscript.Long4 b)

hide
Vector Modulo
param
a
param
b
return

        Long4 result = new Long4();
        result.x = a.x % b.x;
        result.y = a.y % b.y;
        result.z = a.z % b.z;
        result.w = a.w % b.w;

        return result;
    
public voidmod(long value)

hide
Vector Modulo
param
value

        x %= value;
        y %= value;
        z %= value;
        w %= value;
    
public static android.renderscript.Long4mod(android.renderscript.Long4 a, long b)

hide
Vector Modulo
param
a
param
b
return

        Long4 result = new Long4();
        result.x = a.x % b;
        result.y = a.y % b;
        result.z = a.z % b;
        result.w = a.w % b;

        return result;
    
public voidmul(android.renderscript.Long4 a)

hide
Vector multiplication
param
a

        this.x *= a.x;
        this.y *= a.y;
        this.z *= a.z;
        this.w *= a.w;
    
public static android.renderscript.Long4mul(android.renderscript.Long4 a, android.renderscript.Long4 b)

hide
Vector multiplication
param
a
param
b
return

        Long4 result = new Long4();
        result.x = a.x * b.x;
        result.y = a.y * b.y;
        result.z = a.z * b.z;
        result.w = a.w * b.w;

        return result;
    
public voidmul(long value)

hide
Vector multiplication
param
value

        x *= value;
        y *= value;
        z *= value;
        w *= value;
    
public static android.renderscript.Long4mul(android.renderscript.Long4 a, long b)

hide
Vector multiplication
param
a
param
b
return

        Long4 result = new Long4();
        result.x = a.x * b;
        result.y = a.y * b;
        result.z = a.z * b;
        result.w = a.w * b;

        return result;
    
public voidnegate()

hide
set vector negate

        this.x = -x;
        this.y = -y;
        this.z = -z;
        this.w = -w;
    
public voidset(android.renderscript.Long4 a)

hide
set vector value by Long4
param
a

        this.x = a.x;
        this.y = a.y;
        this.z = a.z;
        this.w = a.w;
    
public voidsetAt(int i, long value)

hide
set the vector field value by index
param
i
param
value

        switch (i) {
        case 0:
            x = value;
            return;
        case 1:
            y = value;
            return;
        case 2:
            z = value;
            return;
        case 3:
            w = value;
            return;
        default:
            throw new IndexOutOfBoundsException("Index: i");
        }
    
public voidsetValues(long a, long b, long c, long d)

hide
set the vector field value by Long
param
a
param
b
param
c
param
d

        this.x = a;
        this.y = b;
        this.z = c;
        this.w = d;
    
public static android.renderscript.Long4sub(android.renderscript.Long4 a, android.renderscript.Long4 b)

hide
Vector subtraction
param
a
param
b
return

        Long4 result = new Long4();
        result.x = a.x - b.x;
        result.y = a.y - b.y;
        result.z = a.z - b.z;
        result.w = a.w - b.w;

        return result;
    
public voidsub(long value)

hide
Vector subtraction
param
value

        x -= value;
        y -= value;
        z -= value;
        w -= value;
    
public static android.renderscript.Long4sub(android.renderscript.Long4 a, long b)

hide
Vector subtraction
param
a
param
b
return

        Long4 result = new Long4();
        result.x = a.x - b;
        result.y = a.y - b;
        result.z = a.z - b;
        result.w = a.w - b;

        return result;
    
public voidsub(android.renderscript.Long4 a)

hide
Vector subtraction
param
a

        this.x -= a.x;
        this.y -= a.y;
        this.z -= a.z;
        this.w -= a.w;