It has been too long since I've scaled values. Anyone want to help me?
B4X:
I have a frame area :
y1 +------------------------------------------------------------------+
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
y2 +------------------------------------------------------------------+
x1 x2
X1 = 40
x2 = 525
widthX = x2 - x1 = 485
y1 = 50
y2 = 220
heightY = y2 - y1 = 170
I need to scale points to the frame:
pointsMinX = 3000
pointsMaxX = 4200
pointsMinY = 5000
pointsMaxY = 6400
Example point to scale to frame:
PointX = 3200
PointY = 5450