root/trunk/jps2ps/pps/anglevecteur.pps
| Revision 4, 369 bytes (checked in by jms, 8 months ago) |
|---|
| Line | |
|---|---|
| 1 | %% syntaxe : A B anglevecteur --> angle de AB avec l'horizontale |
| 2 | /anglevecteur { |
| 3 | 4 copy %% A B A B |
| 4 | verticale? %% A B |
| 5 | { |
| 6 | exch pop %% xA yA yB |
| 7 | gt {-90} {90} ifelse |
| 8 | exch pop |
| 9 | } |
| 10 | { |
| 11 | vecteur exch atan |
| 12 | %% dup |
| 13 | %% 180 gt |
| 14 | %% {360 sub} |
| 15 | %% if |
| 16 | } |
| 17 | ifelse |
| 18 | } def |
| 19 |
Note: See TracBrowser for help on using the browser.
