I'm sorry, none code posted by Evgeniy and I are realy exact.
Comparing only the angle sinus to 0 or 1 is not rigorous.
I'm going to try an explaination. If
a equals pi/60 radians (3°) and
b equals pi/2 + pi/60 (93°)
sinus a is equal to 0.052336
sinus b is equal to 0.99863
The codes posted by Evgeniy and I were comparing as well sinus a to 0 and sinus b to 1 and the result isn't the same even there's in both case the same rotation from 0° and 90°. The comparation isn't the same for 'horizontal' or 'vertical' angles.
I think it have been more rigorous to compare sinus a and cosinus b both to 0 (as sinus a, cosinus b is equal to -0.052336)
So, if we want to use trigonometry, instead of :
(or
(equal (vla-get-Angle Obj) 0.0 0.05)
(equal (vla-get-Angle Obj) (* pi 0.5) 0.05)
(equal (vla-get-Angle Obj) pi 0.05)
(equal (vla-get-Angle Obj) (* pi 1.5) 0.05)
)
the good algorithm should be :
((lambda (a)
(or
(equal (sin a) 0.0 0.05)
(equal (cos a) 0.0 0.05)
)
)
(vla-get-Angle Obj)
)