1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::vector3::Vector3;

pub trait Conversion<T>  {
    fn convert(self) -> T;
}

impl Conversion<Vector3> for f32 {
    fn convert(self) -> Vector3 {
        Vector3::new(self, self, self)
    }
}

impl Conversion<Vector3> for i32 {
    fn convert(self) -> Vector3 {
        Vector3::new(self as f32, self as f32, self as f32)
    }
}