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
|
|
|
|
2018-09-22 19:18:59 +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)
|
|
|
|
}
|