Ejemplo n.º 1
0
        public Number_ctor(Context context)
            : base(context)
        {
            Number_prototype = new Number_prototype(Context);
            Number_prototype.SetOwnProperty("constructor", this);

            SetOwnProperty("prototype", Number_prototype);
            SetOwnProperty("MAX_VALUE", double.MaxValue);
            SetOwnProperty("MIN_VALUE", double.MinValue);
            SetOwnProperty("NaN", double.NaN);
            SetOwnProperty("NEGATIVE_INFINITY", double.NegativeInfinity);
            SetOwnProperty("POSITIVE_INFINITY", double.PositiveInfinity);
        }
Ejemplo n.º 2
0
        protected Number_ctor(Context context)
        {
            Context = context;
            Class = ObjClass.Function;

            Number_prototype = new Number_prototype(Context);
            Number_prototype.SetOwnProperty("constructor", this);

            SetOwnProperty("prototype", Number_prototype);
            SetOwnProperty("MAX_VALUE", double.MaxValue);
            SetOwnProperty("MIN_VALUE", double.MinValue);
            SetOwnProperty("NaN", double.NaN);
            SetOwnProperty("NEGATIVE_INFINITY", double.NegativeInfinity);
            SetOwnProperty("POSITIVE_INFINITY", double.PositiveInfinity);
        }