Exemple #1
0
 /// <summary>
 /// Converts an array of half precision values into full precision values.
 /// </summary>
 /// <param name = "values">The values to be converted.</param>
 /// <returns>An array of converted values.</returns>
 public static float[] ConvertToFloat(Half[] values)
 {
     float[] results = new float[values.Length];
     for (int i = 0; i < results.Length; i++)
     {
         results[i] = HalfUtils.Unpack(values[i].RawValue);
     }
     return(results);
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref = "T:DXPlayground.Mathematics.Half" /> structure.
 /// </summary>
 /// <param name = "value">The floating point value that should be stored in 16 bit format.</param>
 public Half(float value)
 {
     this.value = HalfUtils.Pack(value);
 }