Bugfix drawing from density
This commit is contained in:
@@ -80,6 +80,7 @@ CylinderCoordinate PositionDistributionFromDensity::drawPosition(std::mt19937* e
|
||||
random_r = std::sqrt(r_values(*engine));
|
||||
random_phi = phi_values(*engine);
|
||||
random_z = z_values(*engine);
|
||||
random_n = density_values(*engine);
|
||||
// might be bad that the value gets recalculated for each call of density_->density(...)
|
||||
} while (random_n*maximum_density_ >= density_->density(CylinderCoordinate(
|
||||
blitz::TinyVector<double,3>(random_r, random_phi, random_z))));
|
||||
|
||||
Reference in New Issue
Block a user