nalgebra/nalgebra-glm/src/gtx/exterior_product.rs
2018-09-23 17:10:49 +02:00

7 lines
171 B
Rust

use traits::Number;
use aliases::TVec2;
/// The 2D perpendicular product between two vectors.
pub fn cross2d<N: Number>(v: &TVec2<N>, u: &TVec2<N>) -> N {
v.perp(u)
}