From 9947cd5b885a12cff0c1c251b266a483e07dbc75 Mon Sep 17 00:00:00 2001 From: Guilherme Salustiano Date: Mon, 29 Mar 2021 15:20:04 -0300 Subject: [PATCH] Add type aliases for unit vectors --- src/base/alias.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/base/alias.rs b/src/base/alias.rs index 0f62a6e5..42cd37a6 100644 --- a/src/base/alias.rs +++ b/src/base/alias.rs @@ -5,6 +5,7 @@ use crate::base::storage::Owned; #[cfg(any(feature = "std", feature = "alloc"))] use crate::base::vec_storage::VecStorage; use crate::base::Matrix; +use crate::base::Unit; /* * @@ -305,3 +306,23 @@ pub type RowVector4 = Matrix>; pub type RowVector5 = Matrix>; /// A stack-allocated, 6-dimensional row vector. pub type RowVector6 = Matrix>; + +/* + * + * + * Unit Vector. + * + * + */ +/// A stack-allocated, 1-dimensional unit vector. +pub type UnitVector1 = Unit>>; +/// A stack-allocated, 2-dimensional unit vector. +pub type UnitVector2 = Unit>>; +/// A stack-allocated, 3-dimensional unit vector. +pub type UnitVector3 = Unit>>; +/// A stack-allocated, 4-dimensional unit vector. +pub type UnitVector4 = Unit>>; +/// A stack-allocated, 5-dimensional unit vector. +pub type UnitVector5 = Unit>>; +/// A stack-allocated, 6-dimensional unit vector. +pub type UnitVector6 = Unit>>;