Esempio n. 1
0
        /// <summary>
        /// Returns the value of the argument att the position of the 0-based
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="precisionAndRoundingStrategy">strategy for handling precision and rounding of double values</param>
        /// <returns>Value of the argument as a double.</returns>
        /// <exception cref="ExcelErrorValueException"></exception>
        protected double ArgToDecimal(object obj, PrecisionAndRoundingStrategy precisionAndRoundingStrategy)
        {
            var result = ArgToDecimal(obj);

            if (precisionAndRoundingStrategy == PrecisionAndRoundingStrategy.Excel)
            {
                result = RoundingHelper.RoundToSignificantFig(result, NumberOfSignificantFigures);
            }
            return(result);
        }