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)); }
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); }
public static decimal NearRoundUp(decimal valueDec, Int32 nearest = 100) { decimal dividRet = MathDec.Divide(valueDec, nearest); decimal multiRet = MathDec.Multiply(RoundUp(dividRet), nearest); return(multiRet); }
public static decimal FactorizeAmount(decimal amount, decimal factor) { decimal result = MathDec.Multiply(amount, factor); return(result); }