ncollide_utils 0.9.1

DEPRECATED: use ncollide2d or ncollide3d insead.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use na;
use alga::linear::FiniteDimVectorSpace;

// FIXME: move this to alga?
/// Creates a vector with all its components equal to `e`.
#[inline]
pub fn repeat<V: FiniteDimVectorSpace>(e: V::Field) -> V {
    let mut res: V = na::zero();

    for i in 0..V::dimension() {
        res[i] = e.clone()
    }

    res
}