Java Abs abs(float value)

Here you can find the source of abs(float value)

Description

abs

License

LGPL

Declaration

public static float abs(float value) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static float abs(float value) {
        return value >= 0.0F ? value : -value;
    }//from w w  w .jav  a 2 s  .  c  o m

    /**
     * Returns the unsigned value of an int.
     */
    public static int abs(int value) {
        return value >= 0 ? value : -value;
    }
}

Related

  1. abs(final double d)
  2. abs(final double value)
  3. abs(final double x)
  4. abs(final int pNumber)
  5. abs(float f)
  6. abs(float value)
  7. abs(float[] items)
  8. abs(float[] values)
  9. abs(int i)