Merge pull request #904 from Zuzu-Typ/gauss_rand

Silence C4244 warning #904
This commit is contained in:
Christophe 2019-06-21 16:17:15 +02:00 committed by GitHub
commit 5726c5ce71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,7 +228,7 @@ namespace detail
w = x1 * x1 + x2 * x2;
} while(w > genType(1));
return x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean;
return static_cast<genType>(x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean);
}
template<length_t L, typename T, qualifier Q>