From ebfab8dcfd840768d804a5f75dbd2d2d5173581f Mon Sep 17 00:00:00 2001 From: InnocentusLime Date: Fri, 10 Sep 2021 18:27:19 +0300 Subject: [PATCH 1/2] Attempt to fix #984 --- nalgebra-glm/src/constructors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nalgebra-glm/src/constructors.rs b/nalgebra-glm/src/constructors.rs index e998dd23..208a4a6f 100644 --- a/nalgebra-glm/src/constructors.rs +++ b/nalgebra-glm/src/constructors.rs @@ -105,8 +105,8 @@ pub fn mat3x3(m11: T, m12: T, m13: T, m31: T, m32: T, m33: T) -> TMat3 { TMat::::new( m11, m12, m13, - m31, m32, m33, m21, m22, m23, + m31, m32, m33, ) } From 857bd75c33e9201b2f41b6e7c8d7a0f14a4c02ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sat, 25 Sep 2021 12:09:32 +0200 Subject: [PATCH 2/2] Add doc-test for nalgebra_glm::mat3 --- nalgebra-glm/src/constructors.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nalgebra-glm/src/constructors.rs b/nalgebra-glm/src/constructors.rs index 208a4a6f..8afdaa20 100644 --- a/nalgebra-glm/src/constructors.rs +++ b/nalgebra-glm/src/constructors.rs @@ -75,6 +75,21 @@ pub fn mat2x4(m11: T, m12: T, m13: T, m14: T, } /// Create a new 3x3 matrix. +/// +/// # Example +/// ``` +/// # use nalgebra_glm::mat3; +/// let m = mat3( +/// 1.0, 2.0, 3.0, +/// 4.0, 5.0, 6.0, +/// 7.0, 8.0, 9.0 +/// ); +/// assert!( +/// m.m11 == 1.0 && m.m12 == 2.0 && m.m13 == 3.0 && +/// m.m21 == 4.0 && m.m22 == 5.0 && m.m23 == 6.0 && +/// m.m31 == 7.0 && m.m32 == 8.0 && m.m33 == 9.0 +/// ); +/// ``` #[rustfmt::skip] pub fn mat3(m11: T, m12: T, m13: T, m21: T, m22: T, m23: T,