Here you can find the source of signum(final int a)
public static int signum(final int a)
//package com.java2s; //License from project: Open Source License public class Main { /**//from ww w. j a va2 s. c om * @return 1 if the specified value is > 0, 0 if it is 0, -1 otherwise. */ public static int signum(final int a) { return a < 0 ? -1 : a == 0 ? 0 : 1; } /** * @return 1 if the specified value is > 0, 0 if it is 0, -1 otherwise. */ public static int signum(final long a) { return a < 0 ? -1 : a == 0 ? 0 : 1; } }