public abstract class FloatOperator
extends java.lang.Object
Basic operators for type float
.
Constructor and Description |
---|
FloatOperator() |
Modifier and Type | Method and Description |
---|---|
static float |
add(float left,
float right)
Return
left + right . |
static int |
compare(float left,
float right)
Compare
left operand with right operand. |
static float |
divide(float left,
float right)
Return
left / right . |
static boolean |
equal(float left,
float right)
Compare
left operand with right operand. |
static boolean |
greaterEqual(float left,
float right)
Compare
left operand with right operand. |
static boolean |
greaterThan(float left,
float right)
Compare
left operand with right operand. |
static boolean |
lessEqual(float left,
float right)
Compare
left operand with right operand. |
static boolean |
lessThan(float left,
float right)
Compare
left operand with right operand. |
static float |
multiply(float left,
float right)
Return
left * right . |
static float |
negate(float value)
Return
-value . |
static boolean |
notEqual(float left,
float right)
Compare
left operand with right operand. |
static float |
remainder(float left,
float right)
Return
left % right . |
static float |
subtract(float left,
float right)
Return
left - right . |
public static float add(float left, float right)
Return left + right
.
OverflowException
if the result is out of range for type float
.
left
- Left operand.right
- Right operand.public static int compare(float left, float right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.left < right
, zero result if left == right
, positive result if left > right
.public static float divide(float left, float right)
Return left / right
.
OverflowException
if the result is out of range for type float
.
left
- Left operand.right
- Right operand.public static boolean equal(float left, float right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.true
if left == right
, false
if left != right
.public static boolean greaterEqual(float left, float right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.true
if left >= right
, false
otherwise.public static boolean greaterThan(float left, float right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.true
if left > right
, false
otherwise.public static boolean lessEqual(float left, float right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.true
if left <= right
, false
otherwise.public static boolean lessThan(float left, float right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.true
if left < right
, false
otherwise.public static float multiply(float left, float right)
Return left * right
.
OverflowException
if the result is out of range for type float
.
left
- Left operand.right
- Right operand.public static float negate(float value)
Return -value
.
OverflowException
if the result is out of range for type float
.
value
- Operand value.public static boolean notEqual(float left, float right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.true
if left != right
, false
if left == right
.public static float remainder(float left, float right)
Return left % right
.
OverflowException
if the result is out of range for type float
.
left
- Left operand.right
- Right operand.public static float subtract(float left, float right)
Return left - right
.
OverflowException
if the result is out of range for type float
.
left
- Left operand.right
- Right operand.