예제 #1
0
        public static Int32 NearRoundDown(decimal valueDec, Int32 nearest = 100)
        {
            decimal dividRet = MathDec.Divide(valueDec, nearest);

            decimal multiRet = MathDec.Multiply(RoundDown(dividRet), nearest);

            return(RoundToInt(multiRet));
        }
예제 #2
0
        public static decimal PaymentFromAmount(decimal amountMonthly, Int32 timesheetHours, Int32 workingHours, Int32 absenceHours)
        {
            Int32 totalHours = TotalHoursForPayment(timesheetHours, workingHours, absenceHours);

            decimal payment = MathDec.MultiplyAndDivide(totalHours, amountMonthly, timesheetHours);

            return(payment);
        }
예제 #3
0
        public static decimal NearRoundUp(decimal valueDec, Int32 nearest = 100)
        {
            decimal dividRet = MathDec.Divide(valueDec, nearest);

            decimal multiRet = MathDec.Multiply(RoundUp(dividRet), nearest);

            return(multiRet);
        }
예제 #4
0
        public static decimal FactorizeAmount(decimal amount, decimal factor)
        {
            decimal result = MathDec.Multiply(amount, factor);

            return(result);
        }