Add some missing "pub" qualifiers

This commit is contained in:
Matthew Gordon 2019-11-08 07:23:01 -05:00
parent 76a7299fb9
commit 3244181a08
1 changed files with 3 additions and 5 deletions

View File

@ -1,22 +1,20 @@
use nalgebra::{RealField, Vector3}; use nalgebra::{RealField, Vector3};
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
struct Ray<T: RealField> { pub struct Ray<T: RealField> {
origin: Vector3<T>, origin: Vector3<T>,
direction: Vector3<T>, direction: Vector3<T>,
} }
impl<T: RealField> Ray<T> { impl<T: RealField> Ray<T> {
fn new(origin: Vector3<T>, direction: Vector3<T>) -> Ray<T> { pub fn new(origin: Vector3<T>, direction: Vector3<T>) -> Ray<T> {
Ray { Ray {
origin, origin,
direction: direction.normalize(), direction: direction.normalize(),
} }
} }
}
impl<T: RealField> Ray<T> { pub fn point_at(&self, t: T) -> Vector3<T> {
fn point_at(&self, t: T) -> Vector3<T> {
return self.origin + self.direction * t; return self.origin + self.direction * t;
} }
} }