M-File Help: angdiff | View code for angdiff

# angdiff

Difference of two angles

d = angdiff(th1, th2) returns the difference between angles th1 and th2 on the circle. The result is in the interval [-pi pi). If th1 is a column vector, and th2 a scalar then return a column vector where th2 is modulo subtracted from the corresponding elements of th1.

d = angdiff(th) returns the equivalent angle to th in the interval [-pi pi).

Return the equivalent angle in the interval [-pi pi).

© 1990-2014 Peter Corke.