Exemple #1
0
        public static LithpPrimitive Round(LithpList parameters, LithpOpChain state,
                                           LithpInterpreter interp)
        {
            LithpFloat n = (LithpFloat)parameters[0].Cast(LithpType.FLOAT);

            return(new LithpInteger(Convert.ToUInt64(Math.Round(n.value))));
        }
Exemple #2
0
        protected override bool compareMoreThan(LithpPrimitive other)
        {
            LithpFloat iOther = (LithpFloat)other;

            return(value > iOther.value);
        }
Exemple #3
0
        public override bool compareEqual(LithpPrimitive other)
        {
            LithpFloat iOther = (LithpFloat)other;

            return(value == iOther.value);
        }
Exemple #4
0
        protected override LithpPrimitive operatorDivide(LithpPrimitive other)
        {
            LithpFloat iOther = (LithpFloat)other;

            return(new LithpFloat(value / iOther.value));
        }
Exemple #5
0
        protected override LithpPrimitive operatorMultiply(LithpPrimitive other)
        {
            LithpFloat iOther = (LithpFloat)other;

            return(new LithpFloat(value * iOther.value));
        }