ack/lang/basic/lib/sgn.c
2018-06-24 00:35:51 +02:00

18 lines
171 B
C

#include "lib.h"
int _sgn(double v)
{
if (v > 0)
return (1);
if (v < 0)
return (-1);
return (0);
}
int _forsgn(double v)
{
if (v >= 0)
return 1;
return -1;
}