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

8 lines
186 B
Rust

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