Пример #1
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);
 }
Пример #2
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));
 }
Пример #3
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));
 }
Пример #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));
 }
Пример #5
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));
 }
Пример #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public static Half Abs(Half value) =>
 HalfHelper.Abs(value);
Пример #7
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) => HalfHelper.IsPositiveInfinity(half);
Пример #8
0
 /// <summary>
 /// Returns a value indicating whether the specified number evaluates to negative or positive infinity.
 /// </summary>
 /// <param name="half">A half-precision floating-point number.</param>
 /// <returns>true if half evaluates to System.Half.PositiveInfinity or System.Half.NegativeInfinity; otherwise, false.</returns>
 public static bool IsInfinity(Half half) => HalfHelper.IsInfinity(half);
Пример #9
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) => HalfHelper.IsNaN(half);
Пример #10
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) => HalfHelper.Negate(half);