use bevy::prelude::*; use super::Vector3; pub type Vector3I = Vector3; impl Vector3I { pub const ZERO: Self = Self { x: 0, y: 0, z: 0 }; pub const ONE: Self = Self { x: 1, y: 1, z: 1 }; pub const UP: Self = Self { x: 0, y: 1, z: 0 }; pub const DOWN: Self = Self { x: 0, y: -1, z: 0 }; pub const LEFT: Self = Self { x: -1, y: 0, z: 0 }; pub const RIGHT: Self = Self { x: 1, y: 0, z: 0 }; pub const FORWARD: Self = Self { x: 0, y: 0, z: -1 }; pub const BACK: Self = Self { x: 0, y: 0, z: 1 }; } impl From for Vector3I { fn from(vec: Vec3) -> Self { Self { x: vec.x as i32, y: vec.y as i32, z: vec.y as i32, } } } impl From for Vec3 { fn from(vec: Vector3I) -> Self { Vec3 { x: vec.x as f32, y: vec.y as f32, z: vec.z as f32, } } }