In this configuration as follows, we have a nice formula:

$$\cos(\varphi)=\frac{OF.OE+OB.OC}{OF.OB+OE.OC}$$

Is the formula known? and can we generalized for higher dimensions?

[![enter image description here][1]][1]


  [1]: https://i.sstatic.net/5la9npHO.png