angdiff
Difference of two angles
angdiff(th1, th2) is the difference between angles th1 and th2
on the circle. The result is in the interval [-pi pi). Either or both
arguments can be a vector:
- If TH1 is a vector, and TH2 a scalar then return a vector where TH2 is modulo
subtracted from the corresponding elements of TH1.
- If TH1 is a scalar, and TH2 a vector then return a vector where the
corresponding elements of TH2 are modulo subtracted from TH1.
- If TH1 and TH2 are vectors then return a vector whose elements are the modulo
difference of the corresponding elements of TH1 and TH2.
angdiff(th) as above but th=[th1 th2].
angdiff(th) is the equivalent angle to th in the interval [-pi pi).
Notes
- If TH1 and TH2 are both vectors they should have the same
orientation, which the output will assume.
© 1990-2014 Peter Corke.