diff options
Diffstat (limited to 'engine/src/vector.rs')
-rw-r--r-- | engine/src/vector.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engine/src/vector.rs b/engine/src/vector.rs index a5ef911..e0aa262 100644 --- a/engine/src/vector.rs +++ b/engine/src/vector.rs @@ -226,6 +226,20 @@ where } } +impl<Value> From<Value> for Vec3<Value> +where + Value: Clone, +{ + fn from(value: Value) -> Self + { + Self { + x: value.clone(), + y: value.clone(), + z: value, + } + } +} + impl<Value> From<Color<Value>> for Vec3<Value> { fn from(color: Color<Value>) -> Self |