diff --git a/rtiow/src/vec3.rs b/rtiow/src/vec3.rs index 7c8a1ad..cdd9dab 100644 --- a/rtiow/src/vec3.rs +++ b/rtiow/src/vec3.rs @@ -9,9 +9,9 @@ use std::str; #[derive(Default, Debug, PartialEq, Copy, Clone)] pub struct Vec3 { - x: f32, - y: f32, - z: f32, + pub x: f32, + pub y: f32, + pub z: f32, } pub fn cross(v1: Vec3, v2: Vec3) -> Vec3 { @@ -62,7 +62,7 @@ impl fmt::Display for Vec3 { impl str::FromStr for Vec3 { type Err = ParseFloatError; fn from_str(s: &str) -> Result { - let coords: Vec<&str> = s.split(" ").collect(); + let coords: Vec<&str> = s.split(' ').collect(); Ok(Vec3 { x: coords[0].parse::()?, y: coords[1].parse::()?,