Function
angleDistance
(yaw0, pitch0, yaw1, pitch1)
Source from the content-addressed store, hash-verified
| 402 | } |
| 403 | |
| 404 | function angleDistance(yaw0, pitch0, yaw1, pitch1) { |
| 405 | var dYaw = angleMod(yaw1 - yaw0); |
| 406 | var dPitch = angleMod(pitch1 - pitch0); |
| 407 | return Math.sqrt(dYaw * dYaw + dPitch * dPitch); |
| 408 | } |
| 409 | |
| 410 | // reduce an angle in degrees to [-180,180] |
| 411 | function angleMod(angle) { |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…