7052aa88ee
CrossMatrix is a trait for vectors having a cross product representable as a matrix. Row is a trait for Matrixces and Vectors, to access (by index) their rows.
8 lines
223 B
Rust
8 lines
223 B
Rust
/// Traits to access rows of a matrix or vector.
|
|
pub trait Row<R> {
|
|
/// Reads the `i`-th row of `self`.
|
|
fn row(&self, i: uint) -> R;
|
|
/// Writes the `i`-th row of `self`.
|
|
fn set_row(&mut self, i: uint, R);
|
|
}
|