| 24 | double angle(P(p)) { return atan2(imag(p), real(p)); } |
| 25 | point perp(P(p)) { return point(-imag(p), real(p)); } |
| 26 | double progress(P(p), L(a, b)) { |
| 27 | if (abs(real(a) - real(b)) < EPS) |
| 28 | return (imag(p) - imag(a)) / (imag(b) - imag(a)); |
| 29 | else return (real(p) - real(a)) / (real(b) - real(a)); } |
| 30 | // vim: cc=60 ts=2 sts=2 sw=2: |
no outgoing calls
no test coverage detected