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

7 lines
171 B
Rust
Raw Normal View History

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