| 240 | // polar coordinates, however this doesn't involve the radius here. |
| 241 | |
| 242 | real RAngle(real x, real y) |
| 243 | { |
| 244 | real a; |
| 245 | |
| 246 | if (x != 0.0) { |
| 247 | if (y != 0.0) |
| 248 | a = RAtn(y/x); |
| 249 | else |
| 250 | a = x < 0.0 ? rPi : 0.0; |
| 251 | } else |
| 252 | a = y < 0.0 ? -rPiHalf : rPiHalf; |
| 253 | if (a < 0.0) |
| 254 | a += rPi; |
| 255 | if (y < 0.0) |
| 256 | a += rPi; |
| 257 | return a; |
| 258 | } |
| 259 | |
| 260 | |
| 261 | // Like RAngle() but return the angle between two 3D vectors instead. |
no outgoing calls
no test coverage detected