FPRSqrtEstimate: Deduplicate array bounds
Dehardcodes a few constants in the loops.
This commit is contained in:
parent
b7bd70fd19
commit
0a64a66b26
1 changed files with 5 additions and 3 deletions
|
@ -22,9 +22,11 @@ namespace Dynarmic::FP {
|
|||
|
||||
/// Input is a u1.8 fixed point number.
|
||||
static u8 RecipSqrtEstimate(u64 a) {
|
||||
static const std::array<u8, 512> lut = []{
|
||||
std::array<u8, 512> result{};
|
||||
for (u64 i = 128; i < 512; i++) {
|
||||
using LUT = std::array<u8, 512>;
|
||||
|
||||
static const LUT lut = [] {
|
||||
LUT result{};
|
||||
for (u64 i = 128; i < result.size(); i++) {
|
||||
u64 a = i;
|
||||
if (a < 256) {
|
||||
a = a * 2 + 1;
|
||||
|
|
Loading…
Reference in a new issue