]> git.localhorst.tv Git - blobs.git/blobdiff - src/math/GaloisLFSR.hpp
introduce random genetic mutations
[blobs.git] / src / math / GaloisLFSR.hpp
index 4ce278f92b0fb56b0b34d3eaaf7d89975bbbe13c..d380e248405a2efb1ae9b65308d3b05b48e09e18 100644 (file)
@@ -60,7 +60,7 @@ public:
        }
 
        double UNorm() noexcept {
-               return double(Next<std::uint64_t>()) / double(std::numeric_limits<std::uint64_t>::max());
+               return double(Next<std::uint64_t>()) * (1.0 / double(std::numeric_limits<std::uint64_t>::max()));
        }
 
        template<class Container>