Misc formatting

This commit is contained in:
Brendan Zabarauskas 2013-07-13 23:03:37 +10:00
parent e1e6b90c1b
commit 139cd6dbe9
3 changed files with 10 additions and 3 deletions

View file

@ -14,4 +14,3 @@
// limitations under the License. // limitations under the License.
//! Bounding cylinder //! Bounding cylinder

View file

@ -15,7 +15,9 @@
//! Core datatypes and conversion traits for 3D mathematics //! Core datatypes and conversion traits for 3D mathematics
pub use self::mat::{Mat2, ToMat2, Mat3, ToMat3, Mat4, ToMat4}; pub use self::mat::{Mat2, ToMat2};
pub use self::mat::{Mat3, ToMat3};
pub use self::mat::{Mat4, ToMat4};
pub use self::quat::{Quat, ToQuat}; pub use self::quat::{Quat, ToQuat};
pub use self::vec::{Vec2, ToVec2, AsVec2}; pub use self::vec::{Vec2, ToVec2, AsVec2};
pub use self::vec::{Vec3, ToVec3, AsVec3}; pub use self::vec::{Vec3, ToVec3, AsVec3};
@ -35,3 +37,10 @@ pub trait Dimensional<T,Slice> {
pub trait Swap { pub trait Swap {
pub fn swap(&mut self, a: uint, b: uint); pub fn swap(&mut self, a: uint, b: uint);
} }
pub trait ComponentWise<T> {
pub fn component_add(&self) -> T;
pub fn component_mul(&self) -> T;
pub fn component_min(&self) -> T;
pub fn component_max(&self) -> T;
}

View file

@ -31,7 +31,6 @@ impl<T> Ray2<T> {
} }
} }
#[deriving(Clone, Eq)] #[deriving(Clone, Eq)]
pub struct Ray3<T> { pub struct Ray3<T> {
origin: Point3<T>, origin: Point3<T>,