From 051621a2cadc855d39234d8a684b9d2113dd13bb Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Sun, 31 Jan 2021 15:47:23 -0500 Subject: [PATCH] Use M_SQRT1_2 in place of the number --- pcbnew/dialogs/dialog_move_exact.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pcbnew/dialogs/dialog_move_exact.cpp b/pcbnew/dialogs/dialog_move_exact.cpp index dc13df3b59..c42f7b9c16 100644 --- a/pcbnew/dialogs/dialog_move_exact.cpp +++ b/pcbnew/dialogs/dialog_move_exact.cpp @@ -275,10 +275,9 @@ void DIALOG_MOVE_EXACT::OnTextFocusLost( wxFocusEvent& event ) void DIALOG_MOVE_EXACT::OnTextChanged( wxCommandEvent& event ) { - double delta_x = m_moveX.GetDoubleValue(); double delta_y = m_moveY.GetDoubleValue(); - double max_border = std::numeric_limits::max() * 0.7071; + double max_border = std::numeric_limits::max() * M_SQRT1_2; if( m_bbox.GetLeft() + delta_x < -max_border || m_bbox.GetRight() + delta_x > max_border ||