forked from M-Labs/nalgebra
commit
972bbcc845
@ -7,14 +7,6 @@ use traits::structure::{Iterable, IterableMut, Indexable, Basis, Dim};
|
|||||||
use traits::geometry::{Translation, Dot, Norm};
|
use traits::geometry::{Translation, Dot, Norm};
|
||||||
use structs::vec;
|
use structs::vec;
|
||||||
|
|
||||||
impl<N> vec::Vec0<N> {
|
|
||||||
/// Creates a new vector.
|
|
||||||
#[inline]
|
|
||||||
pub fn new() -> vec::Vec0<N> {
|
|
||||||
vec::Vec0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<N> Indexable<uint, N> for vec::Vec0<N> {
|
impl<N> Indexable<uint, N> for vec::Vec0<N> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn at(&self, _: uint) -> N {
|
fn at(&self, _: uint) -> N {
|
||||||
@ -44,14 +36,6 @@ impl<N> Indexable<uint, N> for vec::Vec0<N> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N> vec::Vec0<N> {
|
|
||||||
/// Creates a new vector. The parameter is not taken in account.
|
|
||||||
#[inline]
|
|
||||||
pub fn new_repeat(_: N) -> vec::Vec0<N> {
|
|
||||||
vec::Vec0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<N: 'static> Iterable<N> for vec::Vec0<N> {
|
impl<N: 'static> Iterable<N> for vec::Vec0<N> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn iter<'l>(&'l self) -> Items<'l, N> {
|
fn iter<'l>(&'l self) -> Items<'l, N> {
|
||||||
|
@ -17,6 +17,20 @@ use traits::structure::{Basis, Cast, Dim, Indexable, Iterable, IterableMut};
|
|||||||
#[deriving(Eq, PartialEq, Decodable, Clone, Rand, Zero, Show)]
|
#[deriving(Eq, PartialEq, Decodable, Clone, Rand, Zero, Show)]
|
||||||
pub struct Vec0<N>;
|
pub struct Vec0<N>;
|
||||||
|
|
||||||
|
impl<N> Vec0<N> {
|
||||||
|
/// Creates a new vector.
|
||||||
|
#[inline]
|
||||||
|
pub fn new() -> Vec0<N> {
|
||||||
|
Vec0
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Creates a new vector. The parameter is not taken in account.
|
||||||
|
#[inline]
|
||||||
|
pub fn new_repeat(_: N) -> Vec0<N> {
|
||||||
|
Vec0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Vector of dimension 1.
|
/// Vector of dimension 1.
|
||||||
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
|
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
|
||||||
pub struct Vec1<N> {
|
pub struct Vec1<N> {
|
||||||
|
Loading…
Reference in New Issue
Block a user