From 16b1544fff7e9ca11deb3ae1b891c79eac7ec50e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 21 Jan 2018 11:36:34 +0100 Subject: Implement little bit more of scheme and fix connection angle This commit adds few more bits to scheme but mainly it chnages how connectors specify angles. Originally it was in radians but we was mapping that trough mathematical operations directly to sizes. But that was problematic because of floating point inacuracy and we sometimes founded intersection where there should be one. So this commit gets rid of this at all and instead allows just some fixes axes to be used instead of arbitrary angles. --- qtmips_gui/coreview/latch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qtmips_gui/coreview/latch.cpp') diff --git a/qtmips_gui/coreview/latch.cpp b/qtmips_gui/coreview/latch.cpp index c3bab4f..e3d8ef5 100644 --- a/qtmips_gui/coreview/latch.cpp +++ b/qtmips_gui/coreview/latch.cpp @@ -69,8 +69,8 @@ void Latch::setPos(qreal x, qreal y) { struct Latch::ConnectorPair Latch::new_connector(qreal cy) { SANITY_ASSERT(cy < height, "Latch: Trying to create connector outside of latch height"); ConnectorPair cp; - cp.in = new Connector(0); - cp.out = new Connector(M_PI); + cp.in = new Connector(Connector::AX_X); + cp.out = new Connector(Connector::AX_X); connectors.append(cp); connectors_off.append(cy); setPos(x(), y()); // Update connectors position -- cgit v1.2.3