Exemplo n.º 1
0
 /// <summary>
 /// Writes a floating point number to a char array.
 /// </summary>
 /// <param name="value">The value to write</param>
 /// <param name="chars">The array to write to</param>
 /// <param name="offset">Position in the array to write to</param>
 /// <param name="precision">How many precision digits to include</param>
 /// <returns>Total number of characters that were written to the array</returns>
 public static unsafe int DoubleToUnicode(double value, char[] chars, int offset, int precision)
 {
     fixed(char *charptr = chars)
     {
         return(CharConverter.DoubleToUnicode(value, charptr, chars.Length, offset, precision));
     }
 }
Exemplo n.º 2
0
 public void WriteDouble(double f, int remainders)
 {
     this.Reserve(20);
     this.usagebound += CharConverter.DoubleToUnicode(f, this.buffer, this.usagebound, remainders);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Writes a floating point number to a char array.
 /// </summary>
 /// <param name="value">The value to write</param>
 /// <param name="chars">The char pointer to write to</param>
 /// <param name="length">The total length of the char pointer</param>
 /// <param name="offset">Position in the char pointer to write to</param>
 /// <param name="precision">How many precision digits to include</param>
 /// <returns>Total number of characters that were written to the char pointer</returns>
 public static unsafe int FloatToUnicode(float value, char *chars, int length, int offset, int precision)
 => CharConverter.DoubleToUnicode(value, chars, length, offset, precision);
Exemplo n.º 4
0
 /// <summary>
 /// Writes a floating point number to a char array in base 10.
 /// </summary>
 /// <param name="value">The value to write</param>
 /// <param name="chars">The array to write to</param>
 /// <param name="offset">Position in the array to write to</param>
 /// <param name="precision">How many precision digits to include</param>
 /// <returns>Total number of characters that were written to the array</returns>
 public static int FloatToUnicode(float value, char[] chars, int offset, int precision)
 => CharConverter.DoubleToUnicode(value, chars, offset, precision);