Beispiel #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));
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #4
0
        public static decimal FactorizeAmount(decimal amount, decimal factor)
        {
            decimal result = MathDec.Multiply(amount, factor);

            return(result);
        }