#ifndef __SGN_H__ #define __SGN_H__ inline float sgn(float x) { if ( x == 0 ) return 0.0f; if ( x > 0) return 1.0f; else return -1.0f; } #endif