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

◆ BitDecrement() [1/2]

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

Definition at line 780 of file Half.cs.

781 {
782 ushort num = BitConverter.HalfToUInt16Bits(x);
783 if ((num & 0x7C00) >= 31744)
784 {
785 if (num != 31744)
786 {
787 return x;
788 }
789 return MaxValue;
790 }
791 if (num == 0)
792 {
793 return new Half(32769);
794 }
795 num += (ushort)((num < 0) ? 1 : (-1));
796 return BitConverter.UInt16BitsToHalf(num);
797 }
static Half MaxValue
Definition Half.cs:27
Half(ushort value)
Definition Half.cs:78

References System.Half.Half(), System.BitConverter.HalfToUInt16Bits(), System.Half.MaxValue, and System.BitConverter.UInt16BitsToHalf().