VectorMath contains methods for performing
scalar numeric operations in support of vector numeric operations.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static long | Returns: the saturating addition of the operands.the first operand. a, long the second operand. b)Adds two |
| public static int | Returns: the saturating addition of the operands.the first operand. a, int the second operand. b)Adds two |
| public static short | Returns: the saturating addition of the operands.the first operand. a, short the second operand. b)Adds two |
| public static byte | Returns: the saturating addition of the operands.the first operand. a, byte the second operand. b)Adds two |
| public static long | Returns: the saturating addition of the operands.the first operand. a, long the second operand. b)Adds two |
| public static int | Returns: the saturating addition of the operands.the first operand. a, int the second operand. b)Adds two |
| public static short | Returns: the saturating addition of the operands.the first operand. a, short the second operand. b)Adds two |
| public static byte | Returns: the saturating addition of the operands.the first operand. a, byte the second operand. b)Adds two |
| public static long | Returns: the larger ofa and b.the first operand. a, long the second operand. b)Returns the greater of two |
| public static int | Returns: the larger ofa and b.the first operand. a, int the second operand. b)Returns the greater of two |
| public static short | Returns: the larger ofa and b.the first operand. a, short the second operand. b)Returns the greater of two |
| public static byte | Returns: the larger ofa and b.the first operand. a, byte the second operand. b)Returns the greater of two |
| public static long | Returns: the smaller ofa and b.the first operand. a, long the second operand. b)Returns the smaller of two |
| public static int | Returns: the smaller ofa and b.the first operand. a, int the second operand. b)Returns the smaller of two |
| public static short | Returns: the smaller ofa and b.the first operand. a, short the second operand. b)Returns the smaller of two |
| public static byte | Returns: the smaller ofa and b.the first operand. a, byte the second operand. b)Returns the smaller of two |
| public static long | Returns: the saturating difference of the operands.the first operand. a, long the second operand. b)Subtracts two |
| public static int | Returns: the saturating difference of the operands.the first operand. a, int the second operand. b)Subtracts two |
| public static short | Returns: the saturating difference of the operands.the first operand. a, short the second operand. b)Subtracts two |
| public static byte | Returns: the saturating difference of the operands.the first operand. a, byte the second operand. b)Subtracts two |
| public static long | Returns: the saturating difference of the operands.the first operand. a, long the second operand. b)Subtracts two |
| public static int | Returns: the saturating difference of the operands.the first operand. a, int the second operand. b)Subtracts two |
| public static short | Returns: the saturating difference of the operands.the first operand. a, short the second operand. b)Subtracts two |
| public static byte | Returns: the saturating difference of the operands.the first operand. a, byte the second operand. b)Subtracts two |
| VectorMath | back to summary |
|---|---|
| private VectorMath() | |
| addSaturating | back to summary |
|---|---|
| public static long addSaturating(long a, long b) Adds two
If the result of the addition would otherwise overflow from
a positive value to a negative value then the result is clamped
to the upper bound
| |
| addSaturating | back to summary |
|---|---|
| public static int addSaturating(int a, int b) Adds two
If the result of the addition would otherwise overflow from
a positive value to a negative value then the result is clamped
to the upper bound
| |
| addSaturating | back to summary |
|---|---|
| public static short addSaturating(short a, short b) Adds two
If the result of the addition would otherwise overflow from
a positive value to a negative value then the result is clamped
to the upper bound
| |
| addSaturating | back to summary |
|---|---|
| public static byte addSaturating(byte a, byte b) Adds two
If the result of the addition would otherwise overflow from
a positive value to a negative value then the result is clamped
to the upper bound
| |
| addSaturatingUnsigned | back to summary |
|---|---|
| public static long addSaturatingUnsigned(long a, long b) Adds two
If the result of the unsigned addition would otherwise overflow
from the greater of the two operands to a lesser value then the
result is clamped to the upper bound
| |
| addSaturatingUnsigned | back to summary |
|---|---|
| public static int addSaturatingUnsigned(int a, int b) Adds two
If the result of the unsigned addition would otherwise overflow
from the greater of the two operands to a lesser value then the
result is clamped to the upper bound
| |
| addSaturatingUnsigned | back to summary |
|---|---|
| public static short addSaturatingUnsigned(short a, short b) Adds two
If the result of the unsigned addition would otherwise overflow
from the greater of the two operands to a lesser value then the
result is clamped to the upper bound
| |
| addSaturatingUnsigned | back to summary |
|---|---|
| public static byte addSaturatingUnsigned(byte a, byte b) Adds two
If the result of the unsigned addition would otherwise overflow
from the greater of the two operands to a lesser value then the
result is clamped to the upper bound
| |
| maxUnsigned | back to summary |
|---|---|
| public static long maxUnsigned(long a, long b) Returns the greater of two
| |
| maxUnsigned | back to summary |
|---|---|
| public static int maxUnsigned(int a, int b) Returns the greater of two
| |
| maxUnsigned | back to summary |
|---|---|
| public static short maxUnsigned(short a, short b) Returns the greater of two
| |
| maxUnsigned | back to summary |
|---|---|
| public static byte maxUnsigned(byte a, byte b) Returns the greater of two
| |
| minUnsigned | back to summary |
|---|---|
| public static long minUnsigned(long a, long b) Returns the smaller of two
| |
| minUnsigned | back to summary |
|---|---|
| public static int minUnsigned(int a, int b) Returns the smaller of two
| |
| minUnsigned | back to summary |
|---|---|
| public static short minUnsigned(short a, short b) Returns the smaller of two
| |
| minUnsigned | back to summary |
|---|---|
| public static byte minUnsigned(byte a, byte b) Returns the smaller of two
| |
| subSaturating | back to summary |
|---|---|
| public static long subSaturating(long a, long b) Subtracts two
If the result of the subtraction would otherwise overflow from
a positive value to a negative value then the result is clamped
to the upper bound
| |
| subSaturating | back to summary |
|---|---|
| public static int subSaturating(int a, int b) Subtracts two
If the result of the subtraction would otherwise overflow from
a positive value to a negative value then the result is clamped
to the upper bound
| |
| subSaturating | back to summary |
|---|---|
| public static short subSaturating(short a, short b) Subtracts two
If the result of the subtraction would otherwise overflow from
a positive value to a negative value then the result is clamped
to the upper bound
| |
| subSaturating | back to summary |
|---|---|
| public static byte subSaturating(byte a, byte b) Subtracts two
If the result of the subtraction would otherwise overflow from
a positive value to a negative value then the result is clamped
to the upper bound
| |
| subSaturatingUnsigned | back to summary |
|---|---|
| public static long subSaturatingUnsigned(long a, long b) Subtracts two
If the result of the unsigned subtraction would otherwise underflow
from the lesser of the two operands to a greater value then the
result is clamped to the lower bound
| |
| subSaturatingUnsigned | back to summary |
|---|---|
| public static int subSaturatingUnsigned(int a, int b) Subtracts two
If the result of the unsigned subtraction would otherwise underflow
from the lesser of the two operands to a greater value then the
result is clamped to the lower bound
| |
| subSaturatingUnsigned | back to summary |
|---|---|
| public static short subSaturatingUnsigned(short a, short b) Subtracts two
If the result of the unsigned subtraction would otherwise underflow
from the lesser of the two operands to a greater value then the
result is clamped to the lower bound
| |
| subSaturatingUnsigned | back to summary |
|---|---|
| public static byte subSaturatingUnsigned(byte a, byte b) Subtracts two
If the result of the unsigned subtraction would otherwise underflow
from the lesser of the two operands to a greater value then the
result is clamped to the lower bound
| |