From 7743a27325b9f570527864e9dab1e9cb57671d7b Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 7 Dec 2018 14:53:24 +0100 Subject: [PATCH] Fix of a visual studio compilation issue. --- src/libslic3r/SLA/SLAAutoSupports.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/SLA/SLAAutoSupports.cpp b/src/libslic3r/SLA/SLAAutoSupports.cpp index 9b1c56e51..ca04b1bee 100644 --- a/src/libslic3r/SLA/SLAAutoSupports.cpp +++ b/src/libslic3r/SLA/SLAAutoSupports.cpp @@ -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))); }