///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Mathematics Copyright (c) 2005 - 2008 G-Truc Creation (www.g-truc.net)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2007-05-21
// Updated : 2007-05-21
// Licence : This source is under MIT License
// File    : glm/gtx/component_wise.h
///////////////////////////////////////////////////////////////////////////////////////////////////
// Dependency:
// - GLM core
///////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef glm_gtx_component_wise
#define glm_gtx_component_wise

// Dependency:
#include "../../glm.h"

namespace glm
{
	namespace test{
		void main_ext_gtx_component_wise();
	}//namespace test

	template <typename genType> GLMvalType compAddGTX(const genType& v);
	template <typename genType> GLMvalType compMulGTX(const genType& v);

	template <typename genType> GLMvalType compMinGTX(const genType& v);
	template <typename genType> GLMvalType compMaxGTX(const genType& v);

	namespace gtx{
	//! GLM_GTX_component_wise extension: Operations between components of a type
	namespace component_wise
	{
		template <typename genType> inline GLMvalType compAdd(const genType& v){return compAddGTX(v);} //!< \brief Add all vector components together. (From GLM_GTX_component_wise extension)
		template <typename genType> inline GLMvalType compMul(const genType& v){return compMulGTX(v);} //!< \brief Multiply all vector components together. (From GLM_GTX_component_wise extension)

		template <typename genType> inline GLMvalType compMin(const genType& v){return compMinGTX(v);} //!< \brief Find the minimum value between single vector components. (From GLM_GTX_component_wise extension)
		template <typename genType> inline GLMvalType compMax(const genType& v){return compMaxGTX(v);} //!< \brief Find the maximum value between single vector components. (From GLM_GTX_component_wise extension)

	}//namespace component_wise
	}//namespace gtx
}//namespace glm


#define GLM_GTX_component_wise namespace gtx::component_wise

#include "component_wise.inl"

#endif//glm_gtx_component_wise
