Fix of a visual studio compilation issue.

This commit is contained in:
bubnikv 2018-12-07 14:53:24 +01:00
parent 705ad7fb69
commit 7743a27325

View file

@ -146,8 +146,8 @@ float SLAAutoSupports::get_required_density(float angle) const
{
// calculation would be density_0 * cos(angle). To provide one more degree of freedom, we will scale the angle
// to get the user-set density for 45 deg. So it ends up as density_0 * cos(K * angle).
float K = 4*acos(m_config.density_at_45/m_config.density_at_horizontal) / M_PI;
return std::max(0., m_config.density_at_horizontal * cos(K*angle));
float K = 4.f * float(acos(m_config.density_at_45/m_config.density_at_horizontal) / M_PI);
return std::max(0.f, float(m_config.density_at_horizontal * cos(K*angle)));
}