FITKMS_business.Util.RecommendationService.GetLocalWeight C# (CSharp) Метод

GetLocalWeight() приватный Метод

private GetLocalWeight ( int userId, int tagId ) : double
userId int
tagId int
Результат double
        private double GetLocalWeight(int userId, int tagId)
        {
            System.Data.Objects.ObjectParameter total = new System.Data.Objects.ObjectParameter("BrojTagova", 0);
            int tagNum = DATagovi.CountByUser(total, userId, tagId);
            int maxTagNum = Convert.ToInt32(total.Value);

            if (maxTagNum == 0)
                return 0;

            return (double)tagNum / maxTagNum;
        }