Angle to side of rectangle The title is probably misleading (if I knew what to call it I'm sure I'd have found my answer searching), so here's a graphic demonstrating what I mean.

Basically, say I have either an angle (in radians, I used degrees only for clarity) or, preferably, a normal vector $(x,y)$ "pointing" the same way ($(0.7,0.7)$ being the same as the red line at $270\deg$). How would I translate that to a point on the side of a rectangle?
In the particular case I'm working with, as seen in the graphic, I'm working with sides from -1 to 1. There's probably a word for all of this but I'm not fluent in maths lingo, so hopefully the visual explains my question well enough.
Thanks.
 A: When the angle (in counter-clockwise direction) is $\alpha$, you get the following coöridates on the unit circle:
$$
\left(\begin{matrix} \cos \alpha\\ \sin\alpha\end{matrix}\right)
$$
When $-\frac 14\pi\leq \alpha\leq \frac 14 \pi$, you want the first coördinate to be $1$, so you devide both of them by $\cos\alpha$, getting
$$
\left(\begin{matrix} 1\\ \tan\alpha\end{matrix}\right)
$$
The other cases are similar.
A: Measuring angles of vectors "anchored" at the origin, we can see the rectangle's vertices are joined to the origin by vectors with angles
$$\begin{align*}(1,1)&\longrightarrow 45^\circ=\frac\pi4\; Rad.\\
(-1,1)&\longrightarrow 135^\circ=\frac{3\pi}4\;Rad. \\
(-1,-1)&\longrightarrow 225^\circ=\frac{5\pi}4\;Rad.\\
(1,-1)&\longrightarrow315^\circ=\frac{7\pi}4\;Rad.\end{align*}$$
Thus for instance, any vector with forming with the positive direction of the $\;x$-axis an angle $\;\theta\;,\;\;\frac\pi4 <\theta<\frac{2\pi}4\;$ will intersect the upper side of the rectange, which is on the straight horizontal line $\;y=1\;$ ,  and similarly with the other cases.
Now, how to calculate the coordinates where such a vector intersects the rectangle: take a vector, which is only a segment of a line $\;y=mx\;$ , with $\;m=\tan\theta\;$, and solve the equation
$$mx=1\iff x=\frac1m=\frac1{\tan\theta}=\cot\theta$$
and you're done since then you already have the abscissa $\;x\;$ and, of course, you know the ordinate $\;y\;$, which in the above example is $\;y=1\;$, so your point on the rectangle is $\;\left(\cot\theta\,,\,1\right)\;$
