Exemplo n.º 1
0
 /// <summary>
 /// a critical rate tizedes pont utáni száőmot adja vissza
 /// </summary>
 /// <returns>the counter</returns>
 public int Counter()
 {
     if (CritRate < 1)
     {
         NumberFormatInfo nfi      = new CultureInfo("en-US", false).NumberFormat;
         string           s        = CritRate.ToString("N", nfi);
         string[]         afterdot = s.Split('.');
         return(int.Parse(afterdot[1]));
     }
     else
     {
         return(1);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// a critical rate tizedes pont utáni számjegyre emeli a 10-et, ez critical hut számitáshoz kell
        /// </summary>
        /// <returns>the denominator</returns>
        public int Critdenominator()
        {
            if (CritRate < 1)
            {
                NumberFormatInfo nfi      = new CultureInfo("en-US", false).NumberFormat;
                string           s        = CritRate.ToString("N", nfi);
                string[]         afterdot = s.Split('.');

                int    sz          = afterdot[1].Length;
                double denominator = Math.Pow(10, sz);
                return((int)denominator);
            }
            else
            {
                return(1);
            }
        }