mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-25 20:19:14 -07:00
Eradicated most of Pointf extras compared to pure Eigen::Vector2d.
This commit is contained in:
@@ -153,28 +153,6 @@ std::ostream& operator<<(std::ostream &stm, const Pointf &pointf)
|
||||
return stm << pointf(0) << "," << pointf(1);
|
||||
}
|
||||
|
||||
void Pointf::rotate(double angle)
|
||||
{
|
||||
double cur_x = (*this)(0);
|
||||
double cur_y = (*this)(1);
|
||||
double s = ::sin(angle);
|
||||
double c = ::cos(angle);
|
||||
(*this)(0) = c * cur_x - s * cur_y;
|
||||
(*this)(1) = c * cur_y + s * cur_x;
|
||||
}
|
||||
|
||||
void Pointf::rotate(double angle, const Pointf ¢er)
|
||||
{
|
||||
double cur_x = (*this)(0);
|
||||
double cur_y = (*this)(1);
|
||||
double s = ::sin(angle);
|
||||
double c = ::cos(angle);
|
||||
double dx = cur_x - center(0);
|
||||
double dy = cur_y - center(1);
|
||||
(*this)(0) = center(0) + c * dx - s * dy;
|
||||
(*this)(1) = center(1) + c * dy + s * dx;
|
||||
}
|
||||
|
||||
namespace int128 {
|
||||
|
||||
int orient(const Vec2crd &p1, const Vec2crd &p2, const Vec2crd &p3)
|
||||
|
||||
Reference in New Issue
Block a user