diff --git a/Buddhabrot/Buddhabrot.cpp b/Buddhabrot/Buddhabrot.cpp index bd80c52..eac456e 100644 --- a/Buddhabrot/Buddhabrot.cpp +++ b/Buddhabrot/Buddhabrot.cpp @@ -18,7 +18,7 @@ void buddhabrot::render( nsum = 0; int i, j, n, ix, iy; - double x, y, x0, y0, xnew, ynew; + number x, y, x0, y0, xnew, ynew; // Coordinates sequence std::vector xyseq(nmax); @@ -31,13 +31,13 @@ void buddhabrot::render( std::vector ct(nmax); color* ctp = ct.data(); - for (int i = 0; i < ct.size(); i++) { - ctp[i] = hue((double)i / nmax); + for (size_t i = 0; i < ct.size(); i++) { + ctp[i] = hue((number)i / nmax); } // Make unique random sequence std::mt19937_64 prng(std::chrono::high_resolution_clock::now().time_since_epoch().count() + quote); - std::uniform_real_distribution distribution(0.0, 1.0); + std::uniform_real_distribution distribution(0.0, 1.0); // Iterate int i1 = quote * frames / pool, i2 = (quote + 1) * frames / pool; diff --git a/Buddhabrot/param.cpp b/Buddhabrot/param.cpp index 0961266..88566d1 100644 --- a/Buddhabrot/param.cpp +++ b/Buddhabrot/param.cpp @@ -157,7 +157,7 @@ int __cdecl wmain(int argc, wchar_t *argv[]) { number dur = g.rendermt(pool, img, color::rainbow, true); std::wcout << L"\r" << dur << L"s " << std::endl; std::wcout << L"discard points: " << (100. * buddhabrot::numdiscard / frames) << L"%" << std::endl; - std::wcout << L"average bailout: " << ((double)buddhabrot::nsum / (frames - buddhabrot::numdiscard)) << std::endl; + std::wcout << L"average bailout: " << ((number)buddhabrot::nsum / (frames - buddhabrot::numdiscard)) << std::endl; std::wcout << L"total iterations: " << (buddhabrot::nsum / 1e6) << L"M" << std::endl; // Save image diff --git a/Clifford/script.vcxproj b/Clifford/script.vcxproj index 7d00ca5..53cc125 100644 --- a/Clifford/script.vcxproj +++ b/Clifford/script.vcxproj @@ -128,6 +128,7 @@ MultiThreadedDebug StreamingSIMDExtensions2 Fast + FastCall Console @@ -151,6 +152,7 @@ Fast Speed true + FastCall Console diff --git a/luaattractors.cpp b/luaattractors.cpp index a07638b..779aa9b 100644 --- a/luaattractors.cpp +++ b/luaattractors.cpp @@ -234,7 +234,7 @@ LUNA_DECLEX(luaimage, clear) { LUNA_DECLEX(luaimage, writetga) { auto filename = luaL_checkwstr(L, 1); - auto sensitivity = (double)luaL_optnumber(L, 2, 0.02); + auto sensitivity = (number)luaL_optnumber(L, 2, 0.02); writetga(filename.c_str(), sensitivity); return 0; }