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))); }
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))); }