public static short sign(double d) {return (short) ((d == 0)? 0: (d < 0)? -1: 1);}

public static short sign ( double d ) { return ( short ) ( ( d == 0 ) ? 0 : ( d < 0 ) ? - 1 : 1 ) ; }
public static short Sign(double d){return (short)((d == 0)? 0: (d < 0)? -1: 1);}
