Skip to content

Commit 06d7750

Browse files
author
Dominic Beger
authored
Fix positive x-axis values were shown as negative ones and vice versa
1 parent ae45977 commit 06d7750

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SharpMath/Presentation/Canvas2D.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ private void DrawFeatures(Graphics g)
207207
if (!ValueIndicator)
208208
return;
209209

210-
var currentX = (GridOrigin.X - _previousLocation.X)/GridSize.Width;
210+
var currentX = (_previousLocation.X - GridOrigin.X)/GridSize.Width;
211211
var currentY = (GridOrigin.Y - _previousLocation.Y)/GridSize.Height;
212212

213213
var resultString = $"{Math.Round(currentX, 2)} | {Math.Round(currentY, 2)}";
@@ -289,4 +289,4 @@ private void HandleMouseUp(object sender, MouseEventArgs e)
289289
_isMouseDown = false;
290290
}
291291
}
292-
}
292+
}

0 commit comments

Comments
 (0)