Here you can find the source of RoundDown(final T number)
Parameter | Description |
---|---|
number | number to be handled. |
public static <T extends Number> long RoundDown(final T number)
//package com.java2s; //License from project: Apache License public class Main { /**//from ww w . j a va2s . c o m * Returns a long number by round down with specify number.<br> * Returns 0 if number == null.<br> * e.g: average is 3.5, then return 3. * * @param number * number to be handled. * @return a long number by round down with specify number. */ public static <T extends Number> long RoundDown(final T number) { if (number == null) { return 0; } return number.longValue(); } }