I have a python application where I need to find a position that is exactly in the middle between the two screen coordinates, but I cannot find an algorithm for this. How can I do that?
X-coordinate (x1 + x2) / 2
y coordinate (y1 + y2) / 2
This is elementary geometry:
Or did you mean something else?
dmckee: Yes dear! :)
. , . http://regentsprep.org/regents/math/midpoint/Lmidpoint.htm (Dead Link)
https://en.wikipedia.org/wiki/Midpoint
:
midX = (x1 + x2) / 2 midY = (y1 + y2) / 2
(C) (A, B):
Cx = (Ax + Bx) / 2 Cy = (Ay + By) / 2