List of utility methods to do Float Number Divide
float | div(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; |
float | div(float f1, float f2) div return f2 == 0.0f ? 0 : f1 / f2;
|
float | divide(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; |
float | Divide_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;
|
float | Divide_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));
|