Search code examples
mathfunctiontrigonometryangle

"Mirroring" an angle


I need to obtain the supplement of an angle.

Exactly what I need to do is to implement some kind of code that mirror the angle, let's say, I have 45 degrees -> 135, another example: 80 ->100, 0 degrees -> 180, and so on.


Solution

  • I think you're after 180 - yourAngle.

    Your examples:

    • 45 degrees: 180 - 45 = 135
    • 80 degrees: 180 - 80 = 100
    • 0 degrees: 180 - 0 = 180