Trait nphysics2d::utils::GeneralizedCross
[−]
[src]
pub trait GeneralizedCross { type CrossVector; type CrossMatrix; fn gcross(&self, rhs: &Self) -> Self::CrossVector; fn gcross_matrix(&self) -> Self::CrossMatrix; }
This is a non-standard generalization of the cross product design exclusively to group the 3D cross product and the 2D perpendicular product behind the same interface.
Associated Types
type CrossVector
The result type of the this (non-standard) generalized cross product.
type CrossMatrix
The matrix representation of this (non-standard) generalized cross product.
Required Methods
fn gcross(&self, rhs: &Self) -> Self::CrossVector
Computes this (non-standard) generalized cross product.
fn gcross_matrix(&self) -> Self::CrossMatrix
Computes the matrix represenattion of this (non-standard) generalized cross product.
Implementors
impl<N: Real> GeneralizedCross for Vector2<N> type CrossVector = Vector1<N>; type CrossMatrix = RowVector2<N>;
impl<N: Real> GeneralizedCross for Vector3<N> type CrossVector = Vector3<N>; type CrossMatrix = Matrix3<N>;