Struct half
A half precision float that uses 16 bits instead of 32 bits.
Inherited Members
Namespace: Unity.Mathematics
Assembly: Unity.Mathematics.dll
Syntax
[Serializable]
public struct half : IEquatable<half>, IFormattable
  Constructors
| Name | Description | 
|---|---|
| half(double) | Constructs a half value from a double value.  | 
      
| half(float) | Constructs a half value from a float value.  | 
      
| half(half) | Constructs a half value from a half value.  | 
      
Fields
| Name | Description | 
|---|---|
| value | The raw 16 bit value of the half.  | 
      
| zero | half zero value.  | 
      
Properties
| Name | Description | 
|---|---|
| MaxValue | The maximum finite half value as a single precision float.  | 
      
| MaxValueAsHalf | The maximum finite half value as a half.  | 
      
| MinValue | The minimum finite half value as a single precision float.  | 
      
| MinValueAsHalf | The minimum finite half value as a half.  | 
      
Methods
| Name | Description | 
|---|---|
| Equals(object) | Returns true if the half is equal to a given half, false otherwise.  | 
      
| Equals(half) | Returns true if the half is bitwise equivalent to a given half, false otherwise.  | 
      
| GetHashCode() | Returns a hash code for the half.  | 
      
| ToString() | Returns a string representation of the half.  | 
      
| ToString(string, IFormatProvider) | Returns a string representation of the half using a specified format and culture-specific format information.  | 
      
Operators
| Name | Description | 
|---|---|
| operator ==(half, half) | Returns whether two half values are bitwise equivalent.  | 
      
| explicit operator half(double) | Explicitly converts a double value to a half value.  | 
      
| explicit operator half(float) | Explicitly converts a float value to a half value.  | 
      
| implicit operator double(half) | Implicitly converts a half value to a double value.  | 
      
| implicit operator float(half) | Implicitly converts a half value to a float value.  | 
      
| operator !=(half, half) | Returns whether two half values are not bitwise equivalent.  |