move clamp to bezier itself to prevent deadlocks

This commit is contained in:
itsmattkc
2020-11-23 08:43:02 +11:00
parent 60f515a2cc
commit 7b266c51a4
2 changed files with 6 additions and 2 deletions
+1 -2
View File
@@ -26,7 +26,6 @@
#include <QStyleOptionGraphicsItem>
#include "common/bezier.h"
#include "common/clamp.h"
#include "common/lerp.h"
#include "nodeview.h"
#include "nodeviewscene.h"
@@ -153,7 +152,7 @@ void NodeViewEdge::SetPoints(const QPointF &start, const QPointF &end, bool inpu
y4 = start.y();
}
double t = Bezier::CubicXtoT(clamp(continue_x, x1, x4), x1, x2, x3, x4);
double t = Bezier::CubicXtoT(continue_x, x1, x2, x3, x4);
double y = Bezier::CubicTtoY(y1, y2, y3, y4, t);
angle = qAtan2(end.y() - y, end.x() - continue_x);