1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use ToFromC;
use ffi;
use ;
/// Converts the given (pitch, yaw, roll) to a rotation matrix. The rotations
/// are applied in ZYX order, which matches Rocket League.
///
/// # Example
///
/// ```
/// # extern crate chip;
/// # extern crate nalgebra as na;
/// # use chip::euler_rotation;
/// # use na::Vector3;
/// # use std::f32::consts::PI;
/// let pitch = 0.0;
/// let yaw = PI / 2.0;
/// let roll = 0.0;
/// let pyr = Vector3::new(pitch, yaw, roll);
/// let rotation_matrix = euler_rotation(&pyr);
/// ```