Java Utililty Methods Float Number Divide

List of utility methods to do Float Number Divide

Description

The list of methods to do Float Number Divide are organized into topic(s).

Method

floatdiv(final float a, final float b)
An equivalent to div for float
final float div = (int) (a / b);
if (b >= 0)
    return div;
else
    return div + 1;
floatdiv(float f1, float f2)
div
return f2 == 0.0f ? 0 : f1 / f2;
floatdivide(final float dividend, final float divisor)
Division that is tolerant of NaN.
float value = Float.NaN;
if (!Float.isNaN(dividend) && !Float.isNaN(divisor)) {
    value = dividend / divisor;
return value;
floatDivide_S(float quotient, float divisor)
(Divide_Safe) Performs a divide using 'safe' versions of the quotient and divisor and returns the value.
quotient = MNZ(quotient);
divisor = MNZ(divisor);
return quotient / divisor;
floatDivide_SL(final float quotient, final float divisor)
(Divide_Safe_Limit) Performs a divide using 'safe' versions of the quotient and divisor, and returns the value as a 'limited' number.
return Limit(Divide_S(quotient, divisor));