Function for diagonal line of square or rectangle

jankrulak

New member
Joined
May 5, 2020
Messages
1
Hi All,

I wonder whether anyone here could help me to solve the following issue:

Is it possible to write a formula to get unknown dimension based on the given dimensions but if coordinates of 'P' are on the diagonal line then unknown dimension is zero? I believe, I need a function for the diagonal line which is linked with coordinates of 'P'?

Screenshot 2020-05-05 at 20.11.04.png

I created a spreadsheet to help with the problem which can be found on the following link:


Kind regards,

Jan
 
There is a standard formula for the distance from a point (p, q) to a line ax + by + c = 0:

[MATH]D = \frac{|ap+bq+c|}{\sqrt{a^2 + b^2}}[/MATH]​

This will apply easily if you put the origin of a coordinate system at the lower left, just as you did.
 
Top