nalgebra/nalgebra-glm/src/gtx/exterior_product.rs

9 lines
184 B
Rust
Raw Normal View History

2018-09-21 01:54:12 +08:00
use na::U2;
use traits::Number;
use aliases::Vec;
/// The 2D perpendicular product between two vectors.
2018-09-21 01:54:12 +08:00
pub fn cross<N: Number>(v: &Vec<N, U2>, u: &Vec<N, U2>) -> N {
v.perp(u)
}