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

8 lines
186 B
Rust
Raw Normal View History

2019-03-23 21:29:07 +08:00
use crate::aliases::TVec2;
use crate::traits::Number;
2018-09-21 01:54:12 +08:00
/// The 2D perpendicular product between two vectors.
2021-04-11 17:00:38 +08:00
pub fn cross2d<T: Number>(v: &TVec2<T>, u: &TVec2<T>) -> T {
2018-09-21 01:54:12 +08:00
v.perp(u)
2018-10-22 04:11:27 +08:00
}