示例#1
0
文件: SmartInt.cs 项目: dgakh/SSTypes
        /// <summary>
        /// Parses SmartDouble and returns SmartInt.
        /// Returns SmartInt.BadValue if d is BadValue.
        /// Rounds d.
        /// Does not throw exception.
        /// </summary>
        public static SmartInt Parse(SmartDouble d)
        {
            if (d.isBad())
            {
                return(SmartInt.BadValue);
            }

            return(Parse((System.Double)d));
        }
示例#2
0
        public SSTypes.SmartDouble Additions_SmartDouble()
        {
            SSTypes.SmartDouble s = 0;
            SSTypes.SmartDouble d = 7;

            for (var cc = 0; cc < cycles; cc++)
            {
                s = 0;
                d = 7;

                for (var i = 0; i < count; i++)
                {
                    s += d;
                }
            }

            return(s);
        }