diff options
Diffstat (limited to '')
-rw-r--r-- | graphics/src/transformation.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/graphics/src/transformation.rs b/graphics/src/transformation.rs index 2a19caed..03f453db 100644 --- a/graphics/src/transformation.rs +++ b/graphics/src/transformation.rs @@ -8,7 +8,7 @@ pub struct Transformation(Mat4); impl Transformation { /// Get the identity transformation. pub fn identity() -> Transformation { - Transformation(Mat4::identity()) + Transformation(Mat4::IDENTITY) } /// Creates an orthographic projection. @@ -51,3 +51,9 @@ impl From<Transformation> for [f32; 16] { *t.as_ref() } } + +impl Into<Mat4> for Transformation { + fn into(self) -> Mat4 { + self.0 + } +}
\ No newline at end of file |