How to change the formula to inverse the results?

31 Views Asked by At

I have the following formula: enter image description here

where i and j are both angles between 0° and 360° (they are essentialy vectors with this angle). The formula is inteded to provide a measure on how parallel or orthogonal the two vectors are to oneanother. The output is between 0° and 45°.

However, the way the formula is written it provides me 0° if i and j are 45° different from oneanother and it calulates 45 when the difference of the angle is 0 (or a multiple of 90).

Is there an easy math trick to ensure the output is what is intuitively excepted? i.e. difference in angle = formula output?