Java Number Sign signum(double z)

Here you can find the source of signum(double z)

Description

Returns sign of double number.

License

Open Source License

Parameter

Parameter Description
z double number.

Return

int sign.

Declaration

public static int signum(double z) 

Method Source Code

//package com.java2s;

public class Main {
    /** Returns sign of double number.
     * @param z double number./*  www  .j  a  v  a2s  . c  om*/
     * @return int sign.
     */
    public static int signum(double z) {
        return (z < 0) ? -1 : 1;
    }
}

Related

  1. signum(byte[] value)
  2. signum(Double d)
  3. signum(double value)
  4. signum(final double x)
  5. signum(final int a)
  6. signum(final int i)
  7. signum(final int n)