예제 #1
0
파일: Half.cs 프로젝트: glepag1/stride
 /// <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);
 }
예제 #2
0
파일: Half.cs 프로젝트: glepag1/stride
 /// <summary>
 ///   Initializes a new instance of the <see cref="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);
 }