# Coordinate of the square angle of (A)-|(B)

I'd like to have coordinate of the square angle on the line (A)-|(B) without using the coordinates of A nor B.

\documentclass[margin=5pt]{standalone}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\coordinate (A) at (2,4) ;
\coordinate (B) at (5,3) ;

\draw (A)-|(B) ;

\end{tikzpicture}
\end{document}

-

You can use (A -| B) to obtain the desired coordinate:

## Code:

\documentclass[margin=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}
\coordinate (A) at (2,4) ;
\coordinate (B) at (5,3) ;

\draw (A)-|(B) ;

\coordinate (X) at (A -| B);
\node [red] at (X) {x};
\end{tikzpicture}
\end{document}

-
I sully and uselessly tried ((A) -| (B)). Thank you ! – Tarass Mar 6 at 9:37
@Tarass: Yep, me too. I still do that and have to figure out why every time. Not sure why both styles don't work. – Peter Grill Mar 6 at 11:13