1
0

Implement CLASSIFY

This commit is contained in:
otya128
2016-12-07 19:37:17 +09:00
parent 2ea66e5985
commit 659e1d3c98

View File

@@ -203,6 +203,24 @@ class BuiltinFunction
{
return tanh(arg1);
}
enum Classify
{
NORMAL = 0,
INFINITY = 1,
NAN = 2,
}
static pure nothrow int CLASSIFY(double arg)
{
if (arg.isNaN)
{
return Classify.NAN;
}
if (arg.isInfinity)
{
return Classify.INFINITY;
}
return Classify.NORMAL;
}
static pure nothrow double RAD(double arg1)
{
return arg1 * std.math.PI / 180;