java.lang.Math.signum(float f)


java.lang.Math.signum(float f)

package com.codingdict;



import java.lang.*;



public class MathDemo {



   public static void main(String[] args) {



      // get two float numbers

      float x = 50.14f;

      float y = -4f;



      // call signum for both floats and print the result

      System.out.println("Math.signum(" + x + ")=" + Math.signum(x));

      System.out.println("Math.signum(" + y + ")=" + Math.signum(y));

   }

}