ncollide_utils 0.9.1

DEPRECATED: use ncollide2d or ncollide3d insead.
1
2
3
4
5
6
7
8
9
10
use alga::linear::FiniteDimInnerSpace;
use na;

/// A 2d perpendicular product that does not have compile-time restrictions on the vector dimension..
#[inline]
pub fn perp2<V: FiniteDimInnerSpace>(a: &V, b: &V) -> V::Real {
    assert!(na::dimension::<V>() == 2);

    a[0] * b[1] - a[1] * b[0]
}