diff options
| author | HampusM <hampus@hampusmat.com> | 2026-09-14 10:05:13 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-09-14 10:05:13 +0200 |
| commit | 7effde0f1f6abc1073904b6959cc4a307e7b227d (patch) | |
| tree | 414f0e8046c10bacbd1221ae0072d99982922038 /engine | |
| parent | 2ade9c8959fc3d6ab595dda62dc1091d9bb679b2 (diff) | |
feat(engine): add Vec3::from_vec4 fn
Diffstat (limited to 'engine')
| -rw-r--r-- | engine/src/data_types/vector.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engine/src/data_types/vector.rs b/engine/src/data_types/vector.rs index 64c6b53..3d261bd 100644 --- a/engine/src/data_types/vector.rs +++ b/engine/src/data_types/vector.rs @@ -203,6 +203,15 @@ impl<Value> Vec3<Value> { self.into() } + + pub fn from_vec4(source: Vec4<Value>) -> Self + { + Self { + x: source.x, + y: source.y, + z: source.z, + } + } } impl_math_op_traits!(impl Add for Vec3, (x, y, z)); |
