Example #1
0
 /// <summary>
 /// Returns a value indicating whether the specified number evaluates to positive infinity.
 /// </summary>
 /// <param name="half">A half-precision floating-point number.</param>
 /// <returns>true if half evaluates to System.Half.PositiveInfinity; otherwise, false.</returns>
 public static bool IsPositiveInfinity(Half half)
 {
     return(HalfHelper.IsPositiveInfinity(half));
 }
Example #2
0
 /// <summary>
 /// Returns a value indicating whether the specified number evaluates to not a number (System.Half.NaN).
 /// </summary>
 /// <param name="half">A half-precision floating-point number.</param>
 /// <returns>true if value evaluates to not a number (System.Half.NaN); otherwise, false.</returns>
 public static bool IsNaN(Half half)
 {
     return(HalfHelper.IsNaN(half));
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of System.Half to the value of the specified single-precision floating-point number.
 /// </summary>
 /// <param name="value">The value to represent as a System.Half.</param>
 public Half(float value)
 {
     this = HalfHelper.SingleToHalf(value);
 }
Example #4
0
 /// <summary>
 /// Returns the absolute value of a half-precision floating-point number.
 /// </summary>
 /// <param name="value">A number in the range System.Half.MinValue ≤ value ≤ System.Half.MaxValue.</param>
 /// <returns>A half-precision floating-point number, x, such that 0 ≤ x ≤System.Half.MaxValue.</returns>
 public static Half Abs(Half value)
 {
     return(HalfHelper.Abs(value));
 }
Example #5
0
 /// <summary>
 /// Negates the value of the specified System.Half operand.
 /// </summary>
 /// <param name="half">The System.Half operand.</param>
 /// <returns>The result of half multiplied by negative one (-1).</returns>
 public static Half operator -(Half half)
 {
     return(HalfHelper.Negate(half));
 }