more c++ math

This commit is contained in:
Garux
2021-02-26 01:10:51 +03:00
parent 4ce944444d
commit 9857bb955b
13 changed files with 71 additions and 99 deletions

View File

@@ -11,6 +11,11 @@ Element m_elements[2];
public:
BasicVector2(){
}
template<typename OtherElement>
BasicVector2( const BasicVector2<OtherElement>& other ){
x() = static_cast<Element>( other.x() );
y() = static_cast<Element>( other.y() );
}
BasicVector2( const Element& x_, const Element& y_ ){
x() = x_;
y() = y_;