2018-09-23 20:41:56 +08:00
|
|
|
use aliases::TVec2;
|
2018-10-22 04:11:27 +08:00
|
|
|
use 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.
|
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)
|
2018-10-22 04:11:27 +08:00
|
|
|
}
|