2018-06-23 22:35:51 +00:00
|
|
|
#include "lib.h"
|
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;
|
|
|
|
}
|