various: moved more to core lib

This commit is contained in:
itsmattkc
2023-01-19 16:01:31 -08:00
parent dd9c52ab59
commit c1c6893713
92 changed files with 448 additions and 1558 deletions
+3 -4
View File
@@ -25,7 +25,6 @@
#include <QGraphicsSceneMouseEvent>
#include <QStyleOptionGraphicsItem>
#include "common/bezier.h"
#include "common/lerp.h"
#include "nodeview.h"
#include "nodeviewitem.h"
@@ -183,7 +182,7 @@ void NodeViewEdge::UpdateCurve()
QPainterPath path;
path.moveTo(start);
double angle = qAtan2(end.y() - start.y(), end.x() - start.x());
double angle = std::atan2(end.y() - start.y(), end.x() - start.x());
if (curved_) {
@@ -220,7 +219,7 @@ void NodeViewEdge::UpdateCurve()
path.cubicTo(cp1, cp2, end);
if (!qFuzzyCompare(start.x(), end.x())) {
double continue_x = end.x() - qCos(angle);
double continue_x = end.x() - std::cos(angle);
double x1 = start.x();
double x2 = cp1.x();
@@ -241,7 +240,7 @@ void NodeViewEdge::UpdateCurve()
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);
angle = std::atan2(end.y() - y, end.x() - continue_x);
}
} else {