1994-06-24 11:31:16 +00:00
|
|
|
/* $Id$ */
|
1984-11-29 14:22:02 +00:00
|
|
|
|
2016-12-12 20:15:25 +00:00
|
|
|
int _sgn(double v)
|
1984-11-29 14:22:02 +00:00
|
|
|
{
|
2016-12-12 20:16:32 +00:00
|
|
|
if (v > 0)
|
|
|
|
return (1);
|
|
|
|
if (v < 0)
|
|
|
|
return (-1);
|
|
|
|
return (0);
|
1984-11-29 14:22:02 +00:00
|
|
|
}
|
1988-07-01 17:30:06 +00:00
|
|
|
|
2016-12-12 20:15:25 +00:00
|
|
|
int _forsgn(double v)
|
1988-07-01 17:30:06 +00:00
|
|
|
{
|
2016-12-12 20:16:32 +00:00
|
|
|
if (v >= 0)
|
|
|
|
return 1;
|
1988-07-01 17:30:06 +00:00
|
|
|
return -1;
|
|
|
|
}
|