DevTreks.Extensions/AgBudgetingCalculators/InputsCapital/CapitalService1Input.cs
/// <summary>
/// Get a gradient factor for use with growth series
/// </summary>
Get a gradient factor for use with growth series
Get a gradient factor for use with growth series
public static void GetGradientFactor(
            GeneralRules.GROWTH_SERIES_TYPES growthType, double costChangeAmount,
            double costAmount, out double gradientFactor)
        {
            gradientFactor = 0;
            if (growthType == GeneralRules.GROWTH_SERIES_TYPES.uniform)
            {
                gradientFactor = costChangeAmount;
            }
            else if (growthType == GeneralRules.GROWTH_SERIES_TYPES.linear)
            {
                gradientFactor = costChangeAmount;
            }
            else if (growthType == GeneralRules.GROWTH_SERIES_TYPES.geometric)
            {
                if (costChangeAmount == 0)
                {
                    gradientFactor = 1;
                }
                else
                {
                    gradientFactor = 1 + (costChangeAmount / costAmount);
                }
            }
        }
public static void GetGradientFactor ( GeneralRules . GROWTH_SERIES_TYPES growthType , double costChangeAmount , double costAmount , out double gradientFactor ) { gradientFactor = 0 ; if ( growthType == GeneralRules . GROWTH_SERIES_TYPES . uniform ) { gradientFactor = costChangeAmount ; } else if ( growthType == GeneralRules . GROWTH_SERIES_TYPES . linear ) { gradientFactor = costChangeAmount ; } else if ( growthType == GeneralRules . GROWTH_SERIES_TYPES . geometric ) { if ( costChangeAmount == 0 ) { gradientFactor = 1 ; } else { gradientFactor = 1 + ( costChangeAmount / costAmount ) ; } } }
Get a gradient factor for use with growth series
Get a gradient factor for use with growth series
//this is not correct
growthType
GeneralRules.GROWTH_SERIES_TYPES
costChangeAmount
double
costAmount
double
double
out