mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Merge remote-tracking branch 'origin/master' into feature_arrange_with_libnest2d
# Conflicts: # CMakeLists.txt # lib/Slic3r/GUI/MainFrame.pm
This commit is contained in:
commit
85474e5803
94 changed files with 12419 additions and 4716 deletions
|
@ -249,6 +249,11 @@ inline coordf_t dot(const Pointf &v1, const Pointf &v2) { return v1.x * v2.x + v
|
|||
inline coordf_t dot(const Pointf &v) { return v.x * v.x + v.y * v.y; }
|
||||
inline double length(const Vectorf &v) { return sqrt(dot(v)); }
|
||||
inline double l2(const Vectorf &v) { return dot(v); }
|
||||
inline Vectorf normalize(const Vectorf& v)
|
||||
{
|
||||
coordf_t len = ::sqrt(sqr(v.x) + sqr(v.y));
|
||||
return (len != 0.0) ? 1.0 / len * v : Vectorf(0.0, 0.0);
|
||||
}
|
||||
|
||||
class Pointf3 : public Pointf
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue