Java Utililty Methods Float Number Truncate

List of utility methods to do Float Number Truncate

Description

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

Method

floattrunc(float f)
trunc
return Math.round(f);
floattrunc(float x)
trunc
if (x < 0) {
    return (float) Math.ceil(x);
} else {
    return (float) Math.floor(x);