FileDocCategorySizeDatePackage
Byte2.javaAPI DocAndroid 5.1 API7256Thu Mar 12 22:22:42 GMT 2015android.renderscript

Byte2

public class Byte2 extends Object
Class for exposing the native RenderScript byte2 type back to the Android system.

Fields Summary
public byte
x
public byte
y
Constructors Summary
public Byte2()

    
public Byte2(byte initX, byte initY)

        x = initX;
        y = initY;
    
public Byte2(Byte2 source)

hide

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

hide
Vector add
param
a

        this.x += a.x;
        this.y += a.y;
    
public static android.renderscript.Byte2add(android.renderscript.Byte2 a, android.renderscript.Byte2 b)

hide
Vector add
param
a
param
b
return

        Byte2 result = new Byte2();
        result.x = (byte)(a.x + b.x);
        result.y = (byte)(a.y + b.y);

        return result;
    
public voidadd(byte value)

hide
Vector add
param
value

        x += value;
        y += value;
    
public static android.renderscript.Byte2add(android.renderscript.Byte2 a, byte b)

hide
Vector add
param
a
param
b
return

        Byte2 result = new Byte2();
        result.x = (byte)(a.x + b);
        result.y = (byte)(a.y + b);

        return result;
    
public voidaddAt(int i, byte 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;
        default:
            throw new IndexOutOfBoundsException("Index: i");
        }
    
public voidaddMultiple(android.renderscript.Byte2 a, byte factor)

hide
Vector add Multiple
param
a
param
factor

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

hide
copy the vector to Char array
param
data
param
offset

        data[offset] = x;
        data[offset + 1] = y;
    
public voiddiv(android.renderscript.Byte2 a)

hide
Vector division
param
a

        this.x /= a.x;
        this.y /= a.y;
    
public static android.renderscript.Byte2div(android.renderscript.Byte2 a, android.renderscript.Byte2 b)

hide
Vector division
param
a
param
b
return

        Byte2 result = new Byte2();
        result.x = (byte)(a.x / b.x);
        result.y = (byte)(a.y / b.y);

        return result;
    
public voiddiv(byte value)

hide
Vector division
param
value

        x /= value;
        y /= value;
    
public static android.renderscript.Byte2div(android.renderscript.Byte2 a, byte b)

hide
Vector division
param
a
param
b
return

        Byte2 result = new Byte2();
        result.x = (byte)(a.x / b);
        result.y = (byte)(a.y / b);

        return result;
    
public bytedotProduct(android.renderscript.Byte2 a)

hide
Vector dot Product
param
a
return

        return (byte)((x * a.x) + (y * a.y));
    
public static bytedotProduct(android.renderscript.Byte2 a, android.renderscript.Byte2 b)

hide
Vector dot Product
param
a
param
b
return

        return (byte)((b.x * a.x) + (b.y * a.y));
    
public byteelementSum()

hide
return the element sum of vector
return

        return (byte)(x + y);
    
public byteget(int i)

hide
get the vector field value by index
param
i
return

        switch (i) {
        case 0:
            return x;
        case 1:
            return y;
        default:
            throw new IndexOutOfBoundsException("Index: i");
        }
    
public bytelength()

hide
get vector length
return

        return 2;
    
public voidmul(android.renderscript.Byte2 a)

hide
Vector multiplication
param
a

        this.x *= a.x;
        this.y *= a.y;
    
public static android.renderscript.Byte2mul(android.renderscript.Byte2 a, android.renderscript.Byte2 b)

hide
Vector multiplication
param
a
param
b
return

        Byte2 result = new Byte2();
        result.x = (byte)(a.x * b.x);
        result.y = (byte)(a.y * b.y);

        return result;
    
public voidmul(byte value)

hide
Vector multiplication
param
value

        x *= value;
        y *= value;
    
public static android.renderscript.Byte2mul(android.renderscript.Byte2 a, byte b)

hide
Vector multiplication
param
a
param
b
return

        Byte2 result = new Byte2();
        result.x = (byte)(a.x * b);
        result.y = (byte)(a.y * b);

        return result;
    
public voidnegate()

hide
set vector negate

        this.x = (byte)(-x);
        this.y = (byte)(-y);
    
public voidset(android.renderscript.Byte2 a)

hide
set vector value by Byte2
param
a

        this.x = a.x;
        this.y = a.y;
    
public voidsetAt(int i, byte 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;
        default:
            throw new IndexOutOfBoundsException("Index: i");
        }
    
public voidsetValues(byte a, byte b)

hide
set the vector field value by Char
param
a
param
b

        this.x = a;
        this.y = b;
    
public voidsub(byte value)

hide
Vector subtraction
param
value

        x -= value;
        y -= value;
    
public static android.renderscript.Byte2sub(android.renderscript.Byte2 a, byte b)

hide
Vector subtraction
param
a
param
b
return

        Byte2 result = new Byte2();
        result.x = (byte)(a.x - b);
        result.y = (byte)(a.y - b);

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

hide
Vector subtraction
param
a

        this.x -= a.x;
        this.y -= a.y;
    
public static android.renderscript.Byte2sub(android.renderscript.Byte2 a, android.renderscript.Byte2 b)

hide
Vector subtraction
param
a
param
b
return

        Byte2 result = new Byte2();
        result.x = (byte)(a.x - b.x);
        result.y = (byte)(a.y - b.y);

        return result;