This commit is contained in:
Christophe Riccio 2014-10-06 23:06:34 +02:00
parent 8e1cb985f5
commit 3556f4ad85
3 changed files with 13 additions and 73 deletions

View File

@ -84,61 +84,14 @@ namespace detail
// pow
using std::pow;
/*
template <typename genType>
GLM_FUNC_QUALIFIER genType pow
(
genType const & x,
genType const & y
)
{
GLM_STATIC_ASSERT(
std::numeric_limits<genType>::is_iec559,
"'pow' only accept floating-point inputs");
return std::pow(x, y);
}
*/
VECTORIZE_VEC_VEC(pow)
// exp
using std::exp;
/*
template <typename genType>
GLM_FUNC_QUALIFIER genType exp
(
genType const & x
)
{
GLM_STATIC_ASSERT(
std::numeric_limits<genType>::is_iec559,
"'exp' only accept floating-point inputs");
return std::exp(x);
}
*/
VECTORIZE_VEC(exp)
// log
using std::log;
/*
template <typename genType>
GLM_FUNC_QUALIFIER genType log
(
genType const & x
)
{
GLM_STATIC_ASSERT(
std::numeric_limits<genType>::is_iec559,
"'log' only accept floating-point inputs");
return std::log(x);
}
*/
VECTORIZE_VEC(log)
//exp2, ln2 = 0.69314718055994530941723212145818f
@ -211,27 +164,6 @@ namespace detail
// sqrt
using std::sqrt;
/*
GLM_FUNC_QUALIFIER float sqrt(float x)
{
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
tvec1<float, highp> tmp(detail::compute_sqrt<tvec1, float, highp>::call(x));
return tmp.x;
# else
return detail::compute_sqrt<tvec1, float, highp>::call(x).x;
# endif
}
GLM_FUNC_QUALIFIER double sqrt(double x)
{
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
tvec1<double, highp> tmp(detail::compute_sqrt<tvec1, double, highp>::call(x));
return tmp.x;
# else
return detail::compute_sqrt<tvec1, double, highp>::call(x).x;
# endif
}
*/
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> sqrt(vecType<T, P> const & x)
{

View File

@ -144,7 +144,7 @@ namespace glm
// Implicit basic constructors
GLM_FUNC_DECL tvec4();
GLM_FUNC_DECL tvec4(type const & v);
GLM_FUNC_DECL tvec4(tvec4<T, P> const & v);
template <precision Q>
GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);

View File

@ -49,11 +49,15 @@ namespace glm
{
/// @addtogroup gtx_std_based_type
/// @{
/// Vector type based of one std::size_t component.
/// @see GLM_GTX_std_based_type
typedef tvec1<std::size_t, defaultp> size1;
/// Vector type based of two std::size_t components.
/// @see GLM_GTX_std_based_type
typedef tvec2<std::size_t, defaultp> size2;
/// Vector type based of three std::size_t components.
/// @see GLM_GTX_std_based_type
typedef tvec3<std::size_t, defaultp> size3;
@ -62,14 +66,18 @@ namespace glm
/// @see GLM_GTX_std_based_type
typedef tvec4<std::size_t, defaultp> size4;
/// Vector type based of one std::size_t component.
/// @see GLM_GTX_std_based_type
typedef tvec1<std::size_t, defaultp> size1_t;
/// Vector type based of two std::size_t components.
/// @see GLM_GTX_std_based_type
typedef tvec2<std::size_t, defaultp> size2_t;
/// Vector type based of three std::size_t components.
/// @see GLM_GTX_std_based_type
typedef tvec3<std::size_t, defaultp> size3_t;
/// Vector type based of four std::size_t components.
/// @see GLM_GTX_std_based_type
typedef tvec4<std::size_t, defaultp> size4_t;