mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 20:25:55 +08:00
Code cleanup: Ensure that a floats remain floats all the way through expressions.
This commit is contained in:
parent
5dbfc104b7
commit
34e633a1c0
@ -46,7 +46,7 @@ Flow::spacing() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// rectangle with semicircles at the ends
|
// rectangle with semicircles at the ends
|
||||||
float min_flow_spacing = this->width - this->height * (1 - PI/4.0);
|
float min_flow_spacing = this->width - this->height * (1.0 - PI/4.0);
|
||||||
return this->width - OVERLAP_FACTOR * (this->width - min_flow_spacing);
|
return this->width - OVERLAP_FACTOR * (this->width - min_flow_spacing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,10 +64,10 @@ Flow::spacing(const Flow &other) const {
|
|||||||
assert(this->bridge == other.bridge);
|
assert(this->bridge == other.bridge);
|
||||||
|
|
||||||
if (this->bridge) {
|
if (this->bridge) {
|
||||||
return this->width/2 + other.width/2 + BRIDGE_EXTRA_SPACING;
|
return this->width/2.0 + other.width/2.0 + BRIDGE_EXTRA_SPACING;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this->spacing()/2 + other.spacing()/2;
|
return this->spacing()/2.0 + other.spacing()/2.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This method returns extrusion volume per head move unit. */
|
/* This method returns extrusion volume per head move unit. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user