mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 02:05:56 +08:00
Added Pointf equality operator (scales for comparison).
This commit is contained in:
parent
4d6188e0d1
commit
04bc767421
@ -438,6 +438,10 @@ Pointf3::scale(double factor)
|
||||
this->z *= factor;
|
||||
}
|
||||
|
||||
bool Pointf::operator==(const Pointf& rhs) const {
|
||||
return Point::new_scale(*this) == Point::new_scale(rhs);
|
||||
}
|
||||
|
||||
void
|
||||
Pointf3::translate(const Vectorf3 &vector)
|
||||
{
|
||||
|
@ -116,6 +116,10 @@ class Pointf
|
||||
static Pointf new_unscale(const Point &p) {
|
||||
return Pointf(unscale(p.x), unscale(p.y));
|
||||
};
|
||||
|
||||
// equality operator based on the scaled coordinates
|
||||
bool operator==(const Pointf& rhs) const;
|
||||
|
||||
std::string wkt() const;
|
||||
std::string dump_perl() const;
|
||||
void scale(double factor);
|
||||
|
Loading…
x
Reference in New Issue
Block a user