Commit de09d48b authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[ADD] - added WVector2 constructor to WMatrixFixed.

parent 21831d3e
......@@ -213,6 +213,20 @@ public:
}
}
/**
* Constructor easing the initialization of vectors. This won't compile if Cols != 1 and Rows != 2.
*
* \param x x coefficient
* \param y y coefficient
*/
WMatrixFixed( const ValueT& x, const ValueT& y )
{
BOOST_STATIC_ASSERT( Rows == 2 );
// NOTE: The static Cols == 1 check is done by operator []
operator[]( 0 ) = x;
operator[]( 1 ) = y;
}
/**
* Constructor easing the initialization of vectors. This won't compile if Cols != 1 and Rows != 3.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment