Add back in * operator within Matrix2/3.h for scalar multiplication
The * operator for scalar multiplication within the Matrix2/3.h files is currently commented out (see line 824 of Matrix2.h and line 1398 of Matrix3.h). Correct me if I am wrong, but this functionality can be mirror off of Vector2/3.h's * operator for scalar multiplication. The updated functionality would look like this:
For Matrix3.h:
//**********************************************************************************************************************
/*!\fn const Matrix3<Type> operator*( Other scalar, const Matrix3<Type>& matrix )
// \brief Multiplication operator for the multiplication of a scalar value and a matrix
// \brief (\f$ A=s*B \f$).
//
// \param scalar The left-hand-side scalar value for the multiplication.
// \param matrix The right-hand-side matrix for the multiplication.
// \return The scaled result matrix.
*/
template< typename Type, typename Other >
inline typename std::enable_if< std::is_fundamental<Other>::value, Matrix3<HIGH> >::type
operator*( Other scalar, const Matrix3<Type>& matrix )
{
return matrix*scalar;
}
//**********************************************************************************************************************
For Matrix2.h:
//**********************************************************************************************************************
/*!\fn const Matrix2<Type> operator*( Other scalar, const Matrix2<Type>& matrix )
// \brief Multiplication operator for the multiplication of a scalar value and a matrix
// \brief (\f$ A=s*B \f$).
//
// \param scalar The left-hand-side scalar value for the multiplication.
// \param matrix The right-hand-side matrix for the multiplication.
// \return The scaled result matrix.
*/
template< typename Type, typename Other >
inline typename std::enable_if< std::is_fundamental<Other>::value, Matrix2<HIGH> >::type
operator*( Other scalar, const Matrix2<Type>& matrix )
{
return matrix*scalar;
}
//**********************************************************************************************************************
Edited by palmerb4