2019-03-23 21:29:07 +08:00
|
|
|
use crate::aliases::TVec2;
|
|
|
|
use crate::traits::Number;
|
2018-09-21 01:54:12 +08:00
|
|
|
|
2018-09-22 19:18:59 +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
|
|
|
}
|