X-Git-Url: http://git.localhorst.tv/?p=blobs.git;a=blobdiff_plain;f=src%2Fmath%2FGaloisLFSR.hpp;h=4ce278f92b0fb56b0b34d3eaaf7d89975bbbe13c;hp=592c9afb6a989ab14270756ab844b751c5f4f73c;hb=cd9cee86b336b5ec531028ac2deebb391e48ed21;hpb=42db7d9d2286e50896ad172e2e4a8fbe65c8a4a9 diff --git a/src/math/GaloisLFSR.hpp b/src/math/GaloisLFSR.hpp index 592c9af..4ce278f 100644 --- a/src/math/GaloisLFSR.hpp +++ b/src/math/GaloisLFSR.hpp @@ -56,11 +56,11 @@ public: } double SNorm() noexcept { - return 2.0 * UNorm() - 1.0; + return (2.0 * UNorm()) - 1.0; } double UNorm() noexcept { - return double(Next()) * (1.0 / double(std::numeric_limits::max())); + return double(Next()) / double(std::numeric_limits::max()); } template