#524 fix equality over double values

This commit is contained in:
supermerill 2020-10-04 21:47:02 +02:00
parent 5479ce4b92
commit 3745d1a456
2 changed files with 32 additions and 32 deletions

View File

@ -112,25 +112,25 @@ inline bool equal_layering(const SlicingParameters &sp1, const SlicingParameters
assert(sp2.valid); assert(sp2.valid);
return sp1.base_raft_layers == sp2.base_raft_layers && return sp1.base_raft_layers == sp2.base_raft_layers &&
sp1.interface_raft_layers == sp2.interface_raft_layers && sp1.interface_raft_layers == sp2.interface_raft_layers &&
sp1.base_raft_layer_height == sp2.base_raft_layer_height && std::abs(sp1.base_raft_layer_height - sp2.base_raft_layer_height) < EPSILON &&
sp1.interface_raft_layer_height == sp2.interface_raft_layer_height && std::abs(sp1.interface_raft_layer_height - sp2.interface_raft_layer_height) < EPSILON &&
sp1.contact_raft_layer_height == sp2.contact_raft_layer_height && std::abs(sp1.contact_raft_layer_height - sp2.contact_raft_layer_height) < EPSILON &&
sp1.contact_raft_layer_height_bridging == sp2.contact_raft_layer_height_bridging && sp1.contact_raft_layer_height_bridging == sp2.contact_raft_layer_height_bridging &&
sp1.layer_height == sp2.layer_height && std::abs(sp1.layer_height - sp2.layer_height) < EPSILON &&
sp1.min_layer_height == sp2.min_layer_height && std::abs(sp1.min_layer_height - sp2.min_layer_height) < EPSILON &&
sp1.max_layer_height == sp2.max_layer_height && std::abs(sp1.max_layer_height - sp2.max_layer_height) < EPSILON &&
// sp1.max_suport_layer_height == sp2.max_suport_layer_height && // sp1.max_suport_layer_height == sp2.max_suport_layer_height &&
sp1.first_print_layer_height == sp2.first_print_layer_height && std::abs(sp1.first_print_layer_height - sp2.first_print_layer_height) < EPSILON &&
sp1.first_object_layer_height == sp2.first_object_layer_height && std::abs(sp1.first_object_layer_height - sp2.first_object_layer_height) < EPSILON &&
sp1.first_object_layer_bridging == sp2.first_object_layer_bridging && sp1.first_object_layer_bridging == sp2.first_object_layer_bridging &&
sp1.soluble_interface == sp2.soluble_interface && sp1.soluble_interface == sp2.soluble_interface &&
sp1.gap_raft_object == sp2.gap_raft_object && std::abs(sp1.gap_raft_object - sp2.gap_raft_object) < EPSILON &&
sp1.gap_object_support == sp2.gap_object_support && std::abs(sp1.gap_object_support - sp2.gap_object_support) < EPSILON &&
sp1.gap_support_object == sp2.gap_support_object && std::abs(sp1.gap_support_object - sp2.gap_support_object) < EPSILON &&
sp1.raft_base_top_z == sp2.raft_base_top_z && std::abs(sp1.raft_base_top_z - sp2.raft_base_top_z) < EPSILON &&
sp1.raft_interface_top_z == sp2.raft_interface_top_z && std::abs(sp1.raft_interface_top_z - sp2.raft_interface_top_z) < EPSILON &&
sp1.raft_contact_top_z == sp2.raft_contact_top_z && std::abs(sp1.raft_contact_top_z - sp2.raft_contact_top_z) < EPSILON &&
sp1.object_print_z_min == sp2.object_print_z_min; std::abs(sp1.object_print_z_min - sp2.object_print_z_min) < EPSILON;
} }
typedef std::pair<coordf_t,coordf_t> t_layer_height_range; typedef std::pair<coordf_t,coordf_t> t_layer_height_range;