pascal111 via Digitalmars-d-learn Thu, 28 Jul 2022 05:06:02 -0700
int sgn(T)(T x) {
if(x<0) return -1; else if(x>0) return 1; else return 0; }