Java Float Number Round round(final float value)

Here you can find the source of round(final float value)

Description

round

License

Open Source License

Declaration

public static int round(final float value) 

Method Source Code

//package com.java2s;

public class Main {
    public static int round(final float value) {
        return (int) (value + (0.5f * Math.signum(value)));
    }/*from w  w w.j a  v  a2 s  .c om*/

    public static long round(final double value) {
        return (long) (value + (0.5d * Math.signum(value)));
    }
}

Related

  1. round(final float a)
  2. round(final float f)
  3. round(final float val)
  4. round(final float x, final float roundFactor)
  5. round(float a)
  6. round(float amount, int cent)
  7. round(float axisValue)