Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ BitIncrement() [1/2]

static Half IFloatingPoint< Half >. System.Half.BitIncrement ( Half x)
inlinestatic

Definition at line 760 of file Half.cs.

761 {
762 ushort num = BitConverter.HalfToUInt16Bits(x);
763 if ((num & 0x7C00) >= 31744)
764 {
765 if (num != 64512)
766 {
767 return x;
768 }
769 return MinValue;
770 }
771 if (num == 32768)
772 {
773 return Epsilon;
774 }
775 num += (ushort)((num >= 0) ? 1 : (-1));
776 return BitConverter.UInt16BitsToHalf(num);
777 }
static Half MinValue
Definition Half.cs:25
static Half Epsilon
Definition Half.cs:17

References System.Half.Epsilon, System.BitConverter.HalfToUInt16Bits(), System.Half.MinValue, and System.BitConverter.UInt16BitsToHalf().