used squared()

Sat, 24 Mar 2018 12:06:49 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 24 Mar 2018 12:06:49 +0200
changeset 1321
413d7be6f042
parent 1320
bdb4804bc09c
child 1322
d8935cdb24c0

used squared()

src/editmodes/abstractEditMode.cpp file | annotate | diff | comparison | revisions
--- a/src/editmodes/abstractEditMode.cpp	Sat Mar 24 12:06:22 2018 +0200
+++ b/src/editmodes/abstractEditMode.cpp	Sat Mar 24 12:06:49 2018 +0200
@@ -112,7 +112,7 @@
 	if ((data.releasedButtons & Qt::MidButton) and (countof(m_drawedVerts) < 4) and (not data.mouseMoved))
 	{
 		// Find the closest vertex to our cursor
-		double minimumDistance = 1024.0;
+		double minimumDistance = ::squared(32.0);
 		const Vertex* closest = nullptr;
 		Vertex cursorPosition = renderer()->currentCamera().convert2dTo3d(data.ev->pos());
 		QPoint cursorPosition2D = data.ev->pos();

mercurial