Reputation: 13423
What is the fastest way to know if the a + b > pi
, having only sine and cossine of both a
and b
? I am hoping to not have to use arccos
or arcsin
.
Edit: forgot to mention that a
and b
are in range [0, pi).
Upvotes: 0
Views: 38
Reputation: 5465
With the restriction of the angles domain to [0, pi) that's straightforward. You just have to check if sin(a+b) < 0
and if you already know sin and cos of a and b, then:
sin(a + b) = sin(a)*cos(b) + sin(b)*cos(a)
is what you want.
Upvotes: 2