SQRの引数が負の場合エラーを出すようにした

This commit is contained in:
otya128 committed 2016-09-03 17:41:51 +09:00
1 parent e878837b95
commit 764dbefe0e
1 file changed
+5 -1
+5 -1
View File
@@ -1248,8 +1248,12 @@ class BuiltinFunction
{
return a1 ^^ a2;
}
static pure nothrow double SQR(double a1)
static double SQR(double a1)
{
if (a1 < 0)
{
throw new OutOfRange();
}
return sqrt(a1);
}
//GalateaTalk利用面倒くさい...