add and use BasicVector3.vec2()

This commit is contained in:
Garux
2021-06-23 16:51:03 +03:00
parent 4697d7940c
commit 4471302857
6 changed files with 14 additions and 17 deletions

View File

@@ -108,6 +108,13 @@ public:
return m_elements;
}
BasicVector2<Element>& vec2(){
return reinterpret_cast<BasicVector2<Element>&>( x() );
}
const BasicVector2<Element>& vec2() const {
return reinterpret_cast<const BasicVector2<Element>&>( x() );
}
void set( const Element value ){
x() = y() = z() = value;
}