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

◆ GetCachedPowerForBinaryExponentRange()

static DiyFp System.Number.Grisu3.GetCachedPowerForBinaryExponentRange ( int minExponent,
int maxExponent,
out int decimalExponent )
inlinestaticprivate

Definition at line 1057 of file Number.cs.

1058 {
1059 double num = Math.Ceiling((double)(minExponent + 64 - 1) * 0.3010299956639812);
1060 int num2 = (348 + (int)num - 1) / 8 + 1;
1061 decimalExponent = s_CachedPowersDecimalExponent[num2];
1062 return new DiyFp(s_CachedPowersSignificand[num2], s_CachedPowersBinaryExponent[num2]);
1063 }
static readonly short[] s_CachedPowersBinaryExponent
Definition Number.cs:797
static readonly short[] s_CachedPowersDecimalExponent
Definition Number.cs:810
static readonly ulong[] s_CachedPowersSignificand
Definition Number.cs:823

References System.Math.Ceiling(), System.Number.Grisu3.s_CachedPowersBinaryExponent, System.Number.Grisu3.s_CachedPowersDecimalExponent, and System.Number.Grisu3.s_CachedPowersSignificand.

Referenced by System.Number.Grisu3.TryRunCounted(), and System.Number.Grisu3.TryRunShortest().