sign

double sign(double x);

Returns -1, 0, or 1 depending on the sign of x.

Parameters:
xValue to evaluate function at.

Returns:
-1 if x < 0
0 if x = 0
1 if x > 0

Header:
#include "mathx.h"