summaryrefslogtreecommitdiff
path: root/engine/src/data_types
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/data_types')
-rw-r--r--engine/src/data_types/matrix.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/engine/src/data_types/matrix.rs b/engine/src/data_types/matrix.rs
index 48796bf..3c54bb1 100644
--- a/engine/src/data_types/matrix.rs
+++ b/engine/src/data_types/matrix.rs
@@ -1,5 +1,6 @@
use std::ops::{Index, IndexMut, Mul};
+use crate::data_types::dimens::Dimens3;
use crate::vector::{Vec3, Vec4};
#[derive(Debug, Clone)]
@@ -90,11 +91,11 @@ impl Matrix<f32, 4, 4>
self[CellPos { row: 3, col: 3 }] = 1.0;
}
- pub fn scale(&mut self, scaling: &Vec3<f32>)
+ pub fn scale(&mut self, scaling: &Dimens3<f32>)
{
- self[CellPos { row: 0, col: 0 }] = scaling.x;
- self[CellPos { row: 1, col: 1 }] = scaling.y;
- self[CellPos { row: 2, col: 2 }] = scaling.z;
+ self[CellPos { row: 0, col: 0 }] = scaling.width;
+ self[CellPos { row: 1, col: 1 }] = scaling.height;
+ self[CellPos { row: 2, col: 2 }] = scaling.depth;
self[CellPos { row: 3, col: 3 }] = 1.0;
}