Commit fd1da833 authored by Quentin Khan's avatar Quentin Khan

FGenerateDistribution: take radius into account for plummer

parent 272a3451
......@@ -269,7 +269,7 @@ void unifRandomPlummer(const FSize N, const FReal R, FReal * points) {
while(m > rand_max) {
m = getRandom<FReal>();
}
FReal r = FMath::Sqrt(1.0/(FMath::pow(m, -2.0/3.0) - 1.0)) / r_max;
FReal r = FMath::Sqrt(1.0/(FMath::pow(m, -2.0/3.0) - 1.0)) / r_max * R;
points[j] *= r;
points[j+1] *= r;
points[j+2] *= r;
......
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