Commit bb511315 authored by Samuel Pitoiset's avatar Samuel Pitoiset

FGenerateDistribution: fix build with Clang

This fixes the following error:

error: constexpr variable 'r_max' must be initialized by a constant
expression
parent b0c0c5a1
......@@ -260,7 +260,7 @@ FReal plummerDist(FSize& cpt, const FReal &R) {
template <class FReal>
void unifRandomPlummer(const FSize N, const FReal R, FReal * points) {
constexpr const FReal rand_max = 0.8;
constexpr const FReal r_max = std::sqrt(1.0/(std::pow(rand_max, -2.0/3.0) - 1.0));
const FReal r_max = std::sqrt(1.0/(std::pow(rand_max, -2.0/3.0) - 1.0));
unifRandomPointsOnSphere<FReal>(N, 1, points);
FReal mc = 1.0/static_cast<FReal>(N);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment