| 212 | } |
| 213 | |
| 214 | void Move::clamp() |
| 215 | { |
| 216 | // If yaw/pitch/roll goes equal or greater than -PI/+PI it |
| 217 | // flips the direction of the rotation... we protect against |
| 218 | // that by clamping before the conversion. |
| 219 | |
| 220 | yaw = clampAngleClamp( yaw ); |
| 221 | pitch = clampAngleClamp( pitch ); |
| 222 | roll = clampAngleClamp( roll ); |
| 223 | |
| 224 | // angles are all 16 bit. |
| 225 | pyaw = FANG2IANG(yaw); |
| 226 | ppitch = FANG2IANG(pitch); |
| 227 | proll = FANG2IANG(roll); |
| 228 | |
| 229 | px = clampRangeClamp(x); |
| 230 | py = clampRangeClamp(y); |
| 231 | pz = clampRangeClamp(z); |
| 232 | unclamp(); |
| 233 | } |
| 234 | |
| 235 | void Move::pack(BitStream *stream, const Move * basemove) |
| 236 | { |
no test coverage detected