Java Float Number Divide div(float f1, float f2)

Here you can find the source of div(float f1, float f2)

Description

div

License

Artistic License

Declaration

public static float div(float f1, float f2) 

Method Source Code

//package com.java2s;
/*/*  ww w . java2 s .c om*/
    
 FP version 3.1
    
 Copyright (c) 2004 Andre de Leiradella <leiradella@bigfoot.com>
    
 This program is licensed under the Artistic License.
    
 See http://www.opensource.org/licenses/artistic-license.html for details.
    
 Uses parts or ideas from FPMath. FPMath is copyright (c) 2001 Beartronics and
 is authored by Henry Minsky.
 http://bearlib.sourceforge.net/
    
 Uses parts or ideas from oMathFP. oMathFP is copyright (c) 2004 Dan Carter.
 http://orbisstudios.com/
    
 */

public class Main {
    public static float div(float f1, float f2) {

        return f2 == 0.0f ? 0 : f1 / f2;
    }
}

Related

  1. div(final float a, final float b)
  2. divide(final float dividend, final float divisor)
  3. Divide_S(float quotient, float divisor)
  4. Divide_SL(final float quotient, final float divisor)