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

◆ BitDecrement()

static float System.MathF.BitDecrement ( float x)
inlinestatic

Definition at line 135 of file MathF.cs.

136 {
137 int num = BitConverter.SingleToInt32Bits(x);
138 if ((num & 0x7F800000) >= 2139095040)
139 {
140 if (num != 2139095040)
141 {
142 return x;
143 }
144 return float.MaxValue;
145 }
146 if (num == 0)
147 {
148 return -1E-45f;
149 }
150 num += ((num < 0) ? 1 : (-1));
151 return BitConverter.Int32BitsToSingle(num);
152 }
const float E
Definition MathF.cs:11

References System.MathF.E, System.BitConverter.Int32BitsToSingle(), and System.BitConverter.SingleToInt32Bits().

Referenced by System.Single.BitDecrement().