/// @ref gtx_matrix_operation /// @file glm/gtx/matrix_operation.inl namespace glm { template GLM_FUNC_QUALIFIER tmat2x2 diagonal2x2 ( tvec2 const & v ) { tmat2x2 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; return Result; } template GLM_FUNC_QUALIFIER tmat2x3 diagonal2x3 ( tvec2 const & v ) { tmat2x3 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; return Result; } template GLM_FUNC_QUALIFIER tmat2x4 diagonal2x4 ( tvec2 const & v ) { tmat2x4 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; return Result; } template GLM_FUNC_QUALIFIER tmat3x2 diagonal3x2 ( tvec2 const & v ) { tmat3x2 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; return Result; } template GLM_FUNC_QUALIFIER tmat3x3 diagonal3x3 ( tvec3 const & v ) { tmat3x3 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; Result[2][2] = v[2]; return Result; } template GLM_FUNC_QUALIFIER tmat3x4 diagonal3x4 ( tvec3 const & v ) { tmat3x4 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; Result[2][2] = v[2]; return Result; } template GLM_FUNC_QUALIFIER tmat4x4 diagonal4x4 ( tvec4 const & v ) { tmat4x4 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; Result[2][2] = v[2]; Result[3][3] = v[3]; return Result; } template GLM_FUNC_QUALIFIER tmat4x3 diagonal4x3 ( tvec3 const & v ) { tmat4x3 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; Result[2][2] = v[2]; return Result; } template GLM_FUNC_QUALIFIER tmat4x2 diagonal4x2 ( tvec2 const & v ) { tmat4x2 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; return Result; } }//namespace glm