From 473dbfb3a2c881a99f2046d6eb8001502cec2dbc Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Wed, 21 Nov 2012 14:08:36 +1000 Subject: [PATCH] Comment formatting --- src/mat.rs | 48 ++++++++++++++++++++++++------------------------ src/vec.rs | 32 ++++++++++++++++---------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/mat.rs b/src/mat.rs index c5dec31..01ed8de 100644 --- a/src/mat.rs +++ b/src/mat.rs @@ -26,47 +26,47 @@ pub trait Matrix: Dimensional, Eq, DefaultEq { pure fn row(i: uint) -> Row; } -// /// A 2 x N matrix -// pub trait Matrix2: Matrix { +/// A 2 x N matrix +pub trait Matrix2: Matrix { // /// Construct the matrix from two column vectors // static pure fn from_cols(c0: Col, c1: Col) -> self; -// } +} -// /// A 2 x 2 square matrix -// pub trait Matrix2x2: Matrix2 { +/// A 3 x N matrix +pub trait Matrix3: Matrix { +// /// Construct the matrix from three column vectors +// static pure fn from_cols(c0: Col, c1: Col, c2: Col) -> self; +} + +/// A 4 x N matrix +pub trait Matrix4: Matrix { +// /// Construct the matrix from four column vectors +// static pure fn from_cols(c0: Col, c1: Col, c2: Col, c3: Col) -> self; +} + +/// A 2 x 2 square matrix +pub trait Matrix2x2: Matrix2 { // /// Construct the matrix from a column major series of elements // static pure fn new(c0r0: T, c0r1: T, // c1r0: T, c1r1: T) -> self; -// } +} -// /// A 3 x N matrix -// pub trait Matrix3: Matrix { -// /// Construct the matrix from three column vectors -// static pure fn from_cols(c0: Col, c1: Col, c2: Col) -> self; -// } - -// /// A 3 x 3 square matrix -// pub trait Matrix3x3: Matrix3 { +/// A 3 x 3 square matrix +pub trait Matrix3x3: Matrix3 { // /// Construct the matrix from a column major series of elements // static pure fn new(c0r0: T, c0r1: T, c0r2: T, // c1r0: T, c1r1: T, c1r2: T, // c2r0: T, c2r1: T, c2r2: T) -> self; -// } +} -// /// A 4 x N matrix -// pub trait Matrix4: Matrix { -// /// Construct the matrix from four column vectors -// static pure fn from_cols(c0: Col, c1: Col, c2: Col, c3: Col) -> self; -// } - -// /// A 4 x 4 square matrix -// pub trait Matrix4x4: Matrix4 { +/// A 4 x 4 square matrix +pub trait Matrix4x4: Matrix4 { // /// Construct the matrix from a column major series of elements // static pure fn new(c0r0: T, c0r1: T, c0r2: T, c0r3: T, // c1r0: T, c1r1: T, c1r2: T, c1r3: T, // c2r0: T, c2r1: T, c2r2: T, c2r3: T, // c3r0: T, c3r1: T, c3r2: T, c3r3: T) -> self; -// } +} /// /// A matrix with numeric elements diff --git a/src/vec.rs b/src/vec.rs index 50b5547..a702e5d 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -18,20 +18,20 @@ pub trait Vector: Dimensional, Eq, DefaultEq { static pure fn from_value(value: T) -> self; } -// /// A 2-dimensional vector -// pub trait Vector2: Vector { +/// A 2-dimensional vector +pub trait Vector2: Vector { // static pure fn new(x: T, y: T) -> self; -// } +} -// /// A 3-dimensional vector -// pub trait Vector3: Vector { +/// A 3-dimensional vector +pub trait Vector3: Vector { // static pure fn new(x: T, y: T, z: T) -> self; -// } +} -// /// A 4-dimensional vector -// pub trait Vector4: Vector { +/// A 4-dimensional vector +pub trait Vector4: Vector { // static pure fn new(x: T, y: T, z: T, w: T) -> self; -// } +} /// /// A vector with numeric components @@ -49,27 +49,27 @@ pub trait NumericVector: Vector, Neg{ pure fn dot(other: &self) -> T; } -// /// A 2-dimensional vector with numeric components -// pub trait NumericVector2: Vector { +/// A 2-dimensional vector with numeric components +pub trait NumericVector2: NumericVector { // static pure fn unit_x() -> self; // static pure fn unit_y() -> self; -// } +} /// A 3-dimensional vector with numeric components -pub trait NumericVector3: Vector { +pub trait NumericVector3: NumericVector { // static pure fn unit_x() -> self; // static pure fn unit_y() -> self; // static pure fn unit_z() -> self; pure fn cross(other: &self) -> self; } -// /// A 4-dimensional vector with numeric components -// pub trait NumericVector4: Vector { +/// A 4-dimensional vector with numeric components +pub trait NumericVector4: NumericVector { // static pure fn unit_x() -> self; // static pure fn unit_y() -> self; // static pure fn unit_z() -> self; // static pure fn unit_w() -> self; -// } +} /// /// A vector with geometric properties