2003-03-16 Pedro Mart�nez Juli� <yoros@wanadoo.es>
[mono.git] / mcs / class / corlib / System / DoubleFormatter.cs
1 //
2 // System.DoubleFormatter.cs
3 //
4 // Author:
5 //   Pedro Martinez Juliá  <yoros@wanadoo.es>
6 //
7 // Copyright (C) 2003 Pedro Martínez Juliá <yoros@wanadoo.es>
8 //
9
10 using System;
11 using System.Text;
12 using System.Collections;
13 using System.Globalization;
14
15
16 namespace System {
17
18         internal class DoubleFormatter {
19
20                 const double p = 100000000000000.0d;
21                 const double p10 = 1000000000000000.0;
22                 const int dec_len = 14;
23                 const int dec_len_min = -30;
24
25                 public static string NumberToString (string format,
26                                 NumberFormatInfo nfi, double value) {
27                         FloatingPointFormatter fpf = new FloatingPointFormatter(format,
28                                         nfi, value, p, p10, dec_len, dec_len_min);
29                         return fpf.String;
30                 }
31                 
32         }
33
34 }