Comment formatting

This commit is contained in:
Brendan Zabarauskas 2012-11-21 14:08:36 +10:00
parent 2463a3244c
commit 473dbfb3a2
2 changed files with 40 additions and 40 deletions

View file

@ -26,47 +26,47 @@ pub trait Matrix<T, Col, Row>: Dimensional<T>, Eq, DefaultEq {
pure fn row(i: uint) -> Row; pure fn row(i: uint) -> Row;
} }
// /// A 2 x N matrix /// A 2 x N matrix
// pub trait Matrix2<T, Col, Row>: Matrix<T, Col, Row> { pub trait Matrix2<T, Col, Row>: Matrix<T, Col, Row> {
// /// Construct the matrix from two column vectors // /// Construct the matrix from two column vectors
// static pure fn from_cols(c0: Col, c1: Col) -> self; // static pure fn from_cols(c0: Col, c1: Col) -> self;
// } }
// /// A 2 x 2 square matrix /// A 3 x N matrix
// pub trait Matrix2x2<T, ColRow>: Matrix2<T, ColRow> { pub trait Matrix3<T, Col, Row>: Matrix<T, Col, Row> {
// /// 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<T, Col, Row>: Matrix<T, Col, Row> {
// /// 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<T, ColRow>: Matrix2<T, ColRow, ColRow> {
// /// Construct the matrix from a column major series of elements // /// Construct the matrix from a column major series of elements
// static pure fn new(c0r0: T, c0r1: T, // static pure fn new(c0r0: T, c0r1: T,
// c1r0: T, c1r1: T) -> self; // c1r0: T, c1r1: T) -> self;
// } }
// /// A 3 x N matrix /// A 3 x 3 square matrix
// pub trait Matrix3<T, Col, Row>: Matrix<T, Col, Row> { pub trait Matrix3x3<T, ColRow>: Matrix3<T, ColRow, ColRow> {
// /// 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<T, ColRow>: Matrix3<T, ColRow> {
// /// Construct the matrix from a column major series of elements // /// Construct the matrix from a column major series of elements
// static pure fn new(c0r0: T, c0r1: T, c0r2: T, // static pure fn new(c0r0: T, c0r1: T, c0r2: T,
// c1r0: T, c1r1: T, c1r2: T, // c1r0: T, c1r1: T, c1r2: T,
// c2r0: T, c2r1: T, c2r2: T) -> self; // c2r0: T, c2r1: T, c2r2: T) -> self;
// } }
// /// A 4 x N matrix /// A 4 x 4 square matrix
// pub trait Matrix4<T, Col, Row>: Matrix<T, Col, Row> { pub trait Matrix4x4<T, ColRow>: Matrix4<T, ColRow, ColRow> {
// /// 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<T, ColRow>: Matrix4<T, ColRow, ColRow> {
// /// Construct the matrix from a column major series of elements // /// Construct the matrix from a column major series of elements
// static pure fn new(c0r0: T, c0r1: T, c0r2: T, c0r3: T, // static pure fn new(c0r0: T, c0r1: T, c0r2: T, c0r3: T,
// c1r0: T, c1r1: T, c1r2: T, c1r3: T, // c1r0: T, c1r1: T, c1r2: T, c1r3: T,
// c2r0: T, c2r1: T, c2r2: T, c2r3: T, // c2r0: T, c2r1: T, c2r2: T, c2r3: T,
// c3r0: T, c3r1: T, c3r2: T, c3r3: T) -> self; // c3r0: T, c3r1: T, c3r2: T, c3r3: T) -> self;
// } }
/// ///
/// A matrix with numeric elements /// A matrix with numeric elements

View file

@ -18,20 +18,20 @@ pub trait Vector<T>: Dimensional<T>, Eq, DefaultEq {
static pure fn from_value(value: T) -> self; static pure fn from_value(value: T) -> self;
} }
// /// A 2-dimensional vector /// A 2-dimensional vector
// pub trait Vector2<T>: Vector<T> { pub trait Vector2<T>: Vector<T> {
// static pure fn new(x: T, y: T) -> self; // static pure fn new(x: T, y: T) -> self;
// } }
// /// A 3-dimensional vector /// A 3-dimensional vector
// pub trait Vector3<T>: Vector<T> { pub trait Vector3<T>: Vector<T> {
// static pure fn new(x: T, y: T, z: T) -> self; // static pure fn new(x: T, y: T, z: T) -> self;
// } }
// /// A 4-dimensional vector /// A 4-dimensional vector
// pub trait Vector4<T>: Vector<T> { pub trait Vector4<T>: Vector<T> {
// static pure fn new(x: T, y: T, z: T, w: T) -> self; // static pure fn new(x: T, y: T, z: T, w: T) -> self;
// } }
/// ///
/// A vector with numeric components /// A vector with numeric components
@ -49,27 +49,27 @@ pub trait NumericVector<T>: Vector<T>, Neg<self>{
pure fn dot(other: &self) -> T; pure fn dot(other: &self) -> T;
} }
// /// A 2-dimensional vector with numeric components /// A 2-dimensional vector with numeric components
// pub trait NumericVector2<T>: Vector<T> { pub trait NumericVector2<T>: NumericVector<T> {
// static pure fn unit_x() -> self; // static pure fn unit_x() -> self;
// static pure fn unit_y() -> self; // static pure fn unit_y() -> self;
// } }
/// A 3-dimensional vector with numeric components /// A 3-dimensional vector with numeric components
pub trait NumericVector3<T>: Vector<T> { pub trait NumericVector3<T>: NumericVector<T> {
// static pure fn unit_x() -> self; // static pure fn unit_x() -> self;
// static pure fn unit_y() -> self; // static pure fn unit_y() -> self;
// static pure fn unit_z() -> self; // static pure fn unit_z() -> self;
pure fn cross(other: &self) -> self; pure fn cross(other: &self) -> self;
} }
// /// A 4-dimensional vector with numeric components /// A 4-dimensional vector with numeric components
// pub trait NumericVector4<T>: Vector<T> { pub trait NumericVector4<T>: NumericVector<T> {
// static pure fn unit_x() -> self; // static pure fn unit_x() -> self;
// static pure fn unit_y() -> self; // static pure fn unit_y() -> self;
// static pure fn unit_z() -> self; // static pure fn unit_z() -> self;
// static pure fn unit_w() -> self; // static pure fn unit_w() -> self;
// } }
/// ///
/// A vector with geometric properties /// A vector with geometric properties