Here you can find the source of div(final float a, final float b)
Parameter | Description |
---|---|
a | a parameter |
b | a parameter |
final static public float div(final float a, final float b)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w .j av a2 s . c o m * An equivalent to div for float * * @param a * @param b * @return a div b */ final static public float div(final float a, final float b) { final float div = (int) (a / b); if (b >= 0) return div; else return div + 1; } }