Fixed a scaling issue with the y coordinates in the normalized side

images coordinate space
This commit is contained in:
Paul Schaller 2023-12-23 19:26:30 +01:00
parent 010882aef2
commit 59dc2f6626

View File

@ -54,7 +54,7 @@ public class PointNormalizer {
normalizedX = normalizedX * 2.0 - 1.0;
normalizedY = 1.0 - normalizedY;
double xyRatio = (biggestYValue - smallestYValue) / (biggestXValue - smallestXValue);
double xyRatio = (biggestYValue - smallestYValue) / ((biggestXValue - smallestXValue) / 2.0);
normalizedY = normalizedY * xyRatio;
normalizedPoints[i] = new Point2D.Double(normalizedX, normalizedY);