diff --git a/src/matrix.rs b/src/matrix.rs index d471964..0ac4a24 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -48,7 +48,6 @@ pub trait Matrix2 { // 3x3 Matrix // pub trait Matrix3 { - pure fn scale(vec: &Vec3) -> self; pure fn to_Mat4() -> Mat4; } @@ -56,8 +55,7 @@ pub trait Matrix3 { // 4x4 Matrix // pub trait Matrix4 { - pure fn scale(vec: &Vec3) -> self; - pure fn translate(vec: &Vec3) -> self; + } @@ -423,14 +421,6 @@ pub impl Mat3: Matrix> { } pub impl Mat3: Matrix3 { - #[inline(always)] - pure fn scale(vec: &Vec3) -> Mat3 { - let _0 = cast(0); - self.mul_m(&Mat3::new(vec.x, _0, _0, - _0, vec.y, _0, - _0, _0, vec.z)) - } - #[inline(always)] pure fn to_Mat4() -> Mat4 { Mat4::from_Mat3(&self) @@ -751,26 +741,8 @@ pub impl Mat4: Matrix> { } } -pub impl Mat4: Matrix4 { - #[inline(always)] - pure fn scale(vec: &Vec3) -> Mat4 { - let _0 = cast(0); - self.mul_m(&Mat4::new(vec.x, _0, _0, _0, - _0, vec.y, _0, _0, - _0, _0, vec.z, _0, - _0, _0, _0, cast(1))) - } +pub impl Mat4: Matrix4 { - #[inline(always)] - pure fn translate(vec: &Vec3) -> Mat4 { - Mat4::from_cols(self[0], - self[1], - self[2], - Vec4::new(self[3][0] + vec.x, - self[3][1] + vec.y, - self[3][2] + vec.z, - self[3][3])) - } } pub impl Mat4: Index> {