Пример #1
0
 public static NeoValue ParseNumber(NeoValue[] args)
 {
     if (args.Length != 1)
     {
         throw new NeoError("float expects a single string argument");                              // @TODO @Untested
     }
     return(NeoNumber.Reify(double.Parse(args[0].CheckString().Value)));
 }
Пример #2
0
 public static NeoValue Sqrt(NeoValue[] args)
 {
     if (args.Length != 1)
     {
         throw new NeoError("sqrt expects a single numeric argument");                              // @TODO @Untested
     }
     return(NeoNumber.Reify(Math.Sqrt(args[0].CheckNumber().AsDouble)));
 }