pub struct Matrix3 {
pub data: [[f64; 3]; 3],
}Expand description
A 3×3 matrix stored in row-major order.
Fields§
§data: [[f64; 3]; 3]Implementations§
Source§impl Matrix3
impl Matrix3
Sourcepub fn rotation_x(theta: f64) -> Self
pub fn rotation_x(theta: f64) -> Self
Rotation matrix about the X axis by theta radians.
Rx = | 1 0 0 |
| 0 cos sin |
| 0 -sin cos |Sourcepub fn rotation_y(theta: f64) -> Self
pub fn rotation_y(theta: f64) -> Self
Rotation matrix about the Y axis by theta radians.
Ry = | cos 0 -sin |
| 0 1 0 |
| sin 0 cos |Sourcepub fn rotation_z(theta: f64) -> Self
pub fn rotation_z(theta: f64) -> Self
Rotation matrix about the Z axis by theta radians.
Rz = | cos sin 0 |
| -sin cos 0 |
| 0 0 1 |Trait Implementations§
Auto Trait Implementations§
impl Freeze for Matrix3
impl RefUnwindSafe for Matrix3
impl Send for Matrix3
impl Sync for Matrix3
impl Unpin for Matrix3
impl UnsafeUnpin for Matrix3
impl UnwindSafe for Matrix3
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more