I want to find cooridnates of point placed on div/ viewport borde, relative center and to point outside it.
Here's example:
Does somebody knows where to start? For the first time I'm doing something like this.
I want to add this point so it is not predefined. Basically I need coordinates of where to add it to div.
I was trying to get the ratio between x and y and scale it but reult was wrong.
Thanks.
EDIT:
Using Thomas' answer the results are:
and here's my approach:
Result seems incorrect, maybe I did some mistake.