diff options
author | bubnikv <bubnikv@gmail.com> | 2016-10-16 17:30:56 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2016-10-16 17:30:56 +0300 |
commit | 7d7f093120df5fcdfd1f9b21fc6b0622636a7ff1 (patch) | |
tree | 629a535ccdb2e4de749de28ea8a34c5a6b27d5c9 /xs/src/libslic3r/Flow.cpp | |
parent | 8f40d9b34ea75c5e772dfb4aab18554c49536f8c (diff) |
C++ supports sketched, but not finalized yet. Slic3r is still using
the old Perl supports, but this time with the C++ fillers.
Diffstat (limited to 'xs/src/libslic3r/Flow.cpp')
-rw-r--r-- | xs/src/libslic3r/Flow.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xs/src/libslic3r/Flow.cpp b/xs/src/libslic3r/Flow.cpp index 6b3d1986c..49a55a50e 100644 --- a/xs/src/libslic3r/Flow.cpp +++ b/xs/src/libslic3r/Flow.cpp @@ -77,10 +77,11 @@ Flow::mm3_per_mm() const { } /* This static method returns bridge width for a given nozzle diameter. */ -float -Flow::_bridge_width(float nozzle_diameter, float bridge_flow_ratio) { - if (bridge_flow_ratio == 1) return nozzle_diameter; // optimization to avoid sqrt() - return sqrt(bridge_flow_ratio * (nozzle_diameter*nozzle_diameter)); +float Flow::_bridge_width(float nozzle_diameter, float bridge_flow_ratio) { + return (bridge_flow_ratio == 1.) ? + // optimization to avoid sqrt() + nozzle_diameter : + sqrt(bridge_flow_ratio) * nozzle_diameter; } /* This static method returns a sane extrusion width default. */ |