Exemple #1
0
        public double GetRoundedMetaPercentage(IMetaDataLinks meta, int nearestNumber)
        {
            if (nearestNumber > 100 || nearestNumber < 1)
            {
                nearestNumber = 5;
            }

            double percUsed = Math.Ceiling(100 * (float)meta.Count / (((float)this.SitePostCount + 0.000001)));

            percUsed = Math.Round(percUsed / nearestNumber) * nearestNumber;
            if (percUsed < 1 && meta.Count > 0)
            {
                percUsed = 1;
            }

            return(percUsed);
        }
		public double GetRoundedMetaPercentage(IMetaDataLinks meta, int nearestNumber) {
			if (nearestNumber > 100 || nearestNumber < 1) {
				nearestNumber = 5;
			}

			double percUsed = Math.Ceiling(100 * (float)meta.Count / (((float)this.SitePostCount + 0.000001)));
			percUsed = Math.Round(percUsed / nearestNumber) * nearestNumber;
			if (percUsed < 1 && meta.Count > 0) {
				percUsed = 1;
			}

			return percUsed;
		}
		public double GetRoundedMetaPercentage(IMetaDataLinks meta) {
			return GetRoundedMetaPercentage(meta, 5);
		}
Exemple #4
0
 public double GetRoundedMetaPercentage(IMetaDataLinks meta)
 {
     return(GetRoundedMetaPercentage(meta, 5));
 }