/// <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); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <summary> /// /// </summary> /// <param name="value"></param> /// <returns></returns> public static Half Abs(Half value) => HalfHelper.Abs(value);
/// <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);
/// <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);
/// <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);
/// <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);