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

◆ BitIncrement()

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

Definition at line 154 of file MathF.cs.

155 {
156 int num = BitConverter.SingleToInt32Bits(x);
157 if ((num & 0x7F800000) >= 2139095040)
158 {
159 if (num != -8388608)
160 {
161 return x;
162 }
163 return float.MinValue;
164 }
165 if (num == int.MinValue)
166 {
167 return float.Epsilon;
168 }
169 num += ((num >= 0) ? 1 : (-1));
170 return BitConverter.Int32BitsToSingle(num);
171 }

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

Referenced by System.Single.BitIncrement().