FanDouble defines the methods for sys::Float. The actual class used for representation is System.Double.
Exemplo n.º 1
0
 static string toLocaleBytes(long b)
 {
     if (b < KB)
     {
         return(b + "B");
     }
     if (b < 10 * KB)
     {
         return(FanFloat.toLocale((double)b / KB, "#.#") + "KB");
     }
     if (b < MB)
     {
         return(Math.Round((double)b / KB) + "KB");
     }
     if (b < 10 * MB)
     {
         return(FanFloat.toLocale((double)b / MB, "#.#") + "MB");
     }
     if (b < GB)
     {
         return(Math.Round((double)b / MB) + "MB");
     }
     if (b < 10 * GB)
     {
         return(FanFloat.toLocale((double)b / GB, "#.#") + "GB");
     }
     return(Math.Round((double)b / GB) + "GB");
 }
Exemplo n.º 2
0
 public static Double toFloat(string self, bool check)
 {
     return(FanFloat.fromStr(self, check));
 }
Exemplo n.º 3
0
 public static Double toFloat(string self)
 {
     return(FanFloat.fromStr(self, true));
 }