Answer the question
In order to leave comments, you need to log in
How to find the distance from the center to the side of a rotated rectangle?
There is a rectangle located at the origin. How, knowing the angle and dimensions of the rectangle, find the distance from this origin (the center of the rectangle) to its sides (A1 and B1 in the figure)?
Answer the question
In order to leave comments, you need to log in
If it is rotated through an angle a, then
A1=min(A/abs(cos(a)),B/abs(sin(a))),
B1=min(B/abs(cos(a)),A/abs (sin(a))).
If you have to divide by 0, then the result of the division is considered equal to infinity, and the value of the minimum is considered to be the second number.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question