Comment formatting
This commit is contained in:
parent
2463a3244c
commit
473dbfb3a2
2 changed files with 40 additions and 40 deletions
48
src/mat.rs
48
src/mat.rs
|
@ -26,47 +26,47 @@ pub trait Matrix<T, Col, Row>: Dimensional<T>, Eq, DefaultEq {
|
|||
pure fn row(i: uint) -> Row;
|
||||
}
|
||||
|
||||
// /// A 2 x N matrix
|
||||
// pub trait Matrix2<T, Col, Row>: Matrix<T, Col, Row> {
|
||||
/// A 2 x N matrix
|
||||
pub trait Matrix2<T, Col, Row>: Matrix<T, Col, Row> {
|
||||
// /// 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<T, ColRow>: Matrix2<T, ColRow> {
|
||||
/// A 3 x N matrix
|
||||
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
|
||||
// static pure fn new(c0r0: T, c0r1: T,
|
||||
// c1r0: T, c1r1: T) -> self;
|
||||
// }
|
||||
}
|
||||
|
||||
// /// A 3 x N matrix
|
||||
// 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 3 x 3 square matrix
|
||||
// pub trait Matrix3x3<T, ColRow>: Matrix3<T, ColRow> {
|
||||
/// A 3 x 3 square matrix
|
||||
pub trait Matrix3x3<T, ColRow>: Matrix3<T, ColRow, ColRow> {
|
||||
// /// 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<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 4 x 4 square matrix
|
||||
// pub trait Matrix4x4<T, ColRow>: Matrix4<T, ColRow, ColRow> {
|
||||
/// 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
|
||||
// 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
|
||||
|
|
32
src/vec.rs
32
src/vec.rs
|
@ -18,20 +18,20 @@ pub trait Vector<T>: Dimensional<T>, Eq, DefaultEq {
|
|||
static pure fn from_value(value: T) -> self;
|
||||
}
|
||||
|
||||
// /// A 2-dimensional vector
|
||||
// pub trait Vector2<T>: Vector<T> {
|
||||
/// A 2-dimensional vector
|
||||
pub trait Vector2<T>: Vector<T> {
|
||||
// static pure fn new(x: T, y: T) -> self;
|
||||
// }
|
||||
}
|
||||
|
||||
// /// A 3-dimensional vector
|
||||
// pub trait Vector3<T>: Vector<T> {
|
||||
/// A 3-dimensional vector
|
||||
pub trait Vector3<T>: Vector<T> {
|
||||
// static pure fn new(x: T, y: T, z: T) -> self;
|
||||
// }
|
||||
}
|
||||
|
||||
// /// A 4-dimensional vector
|
||||
// pub trait Vector4<T>: Vector<T> {
|
||||
/// A 4-dimensional vector
|
||||
pub trait Vector4<T>: Vector<T> {
|
||||
// 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<T>: Vector<T>, Neg<self>{
|
|||
pure fn dot(other: &self) -> T;
|
||||
}
|
||||
|
||||
// /// A 2-dimensional vector with numeric components
|
||||
// pub trait NumericVector2<T>: Vector<T> {
|
||||
/// A 2-dimensional vector with numeric components
|
||||
pub trait NumericVector2<T>: NumericVector<T> {
|
||||
// static pure fn unit_x() -> self;
|
||||
// static pure fn unit_y() -> self;
|
||||
// }
|
||||
}
|
||||
|
||||
/// 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_y() -> self;
|
||||
// static pure fn unit_z() -> self;
|
||||
pure fn cross(other: &self) -> self;
|
||||
}
|
||||
|
||||
// /// A 4-dimensional vector with numeric components
|
||||
// pub trait NumericVector4<T>: Vector<T> {
|
||||
/// A 4-dimensional vector with numeric components
|
||||
pub trait NumericVector4<T>: NumericVector<T> {
|
||||
// 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
|
||||
|
|
Loading…
Reference in a new issue