More elegant version of fast solution:

var sign = number?number<0?-1:1:0