File tree Expand file tree Collapse file tree 3 files changed +464
-10
lines changed
Expand file tree Collapse file tree 3 files changed +464
-10
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,11 @@ class PointsSet
9090 push_back (other.points_ .begin (), other.points_ .end ());
9191 }
9292
93+ void push_back (PointsSet&& other)
94+ {
95+ points_.insert (points_.end (), std::make_move_iterator (other.points_ .begin ()), std::make_move_iterator (other.points_ .end ()));
96+ }
97+
9398 void push_back (const const_iterator& begin, const const_iterator& end)
9499 {
95100 points_.insert (points_.end (), begin, end);
Original file line number Diff line number Diff line change @@ -38,16 +38,26 @@ template<utils::floating_point FactorType>
3838 return std::llrint (std::lerp (static_cast <double >(a), static_cast <double >(b), t));
3939}
4040
41- [[nodiscard]] inline bool fuzzy_equal ( coord_t a, coord_t b )
41+ [[nodiscard]] inline bool fuzzy_is_null ( const coord_t value )
4242{
43- return std::abs (b - a ) <= EPSILON;
43+ return std::abs (value ) <= EPSILON;
4444}
4545
46- [[nodiscard]] inline bool fuzzy_not_equal (coord_t a, coord_t b)
46+ [[nodiscard]] inline bool fuzzy_equal (const coord_t a, const coord_t b)
47+ {
48+ return fuzzy_is_null (b - a);
49+ }
50+
51+ [[nodiscard]] inline bool fuzzy_not_equal (const coord_t a, const coord_t b)
4752{
4853 return ! fuzzy_equal (a, b);
4954}
5055
56+ [[nodiscard]] inline bool fuzzy_is_greater (const coord_t a, const coord_t b)
57+ {
58+ return a - b > EPSILON;
59+ }
60+
5161} // namespace cura
5262
5363
You can’t perform that action at this time.
0 commit comments