private double GetPpm(PersonalData personalData)
        {
            if (personalData.Gender == Gender.M)
            {
                return(66.47 + 13.75 * personalData.Weight + 5 * personalData.Height - 6.75 * personalData.Age);
            }

            return(665.09 + 9.56 * personalData.Weight + 1.85 * personalData.Height - 4.67 * personalData.Age);
        }
        public DietRequirements GetRequirements(PersonalData personalData, int numberOfMeals)
        {
            var requirements = new DietRequirements {
                Calories = GetPpm(personalData) * personalData.Pal
            };
            var tolerance = 0.1;

            SetNutrientsRanges(requirements);
            SetMealsSplit(requirements, numberOfMeals);
            requirements.CaloriesAllowedRange = GetRangeOf(requirements.Calories, 1 - tolerance, 1 + tolerance);

            return(requirements);
        }