Commit 7e456138 authored by Robert Menzel's avatar Robert Menzel

updated GLM to 0.9.4.6

parent 29d22745
The MIT License
Copyright (c) 2005 - 2012 G-Truc Creation
Copyright (c) 2005 - 2013 G-Truc Creation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
......@@ -445,7 +445,14 @@ namespace detail
# define GLM_RESTRICT __declspec(restrict)
# define GLM_RESTRICT_VAR __restrict
# define GLM_CONSTEXPR
#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31))
#elif(GLM_COMPILER & GLM_COMPILER_INTEL)
# define GLM_DEPRECATED
# define GLM_ALIGN(x) __declspec(align(x))
# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct
# define GLM_RESTRICT
# define GLM_RESTRICT_VAR __restrict
# define GLM_CONSTEXPR
#elif(((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) || (GLM_COMPILER & GLM_COMPILER_CLANG))
# define GLM_DEPRECATED __attribute__((__deprecated__))
# define GLM_ALIGN(x) __attribute__((aligned(x)))
# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x)))
......
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
......
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
......
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
......
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
......
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
......@@ -36,7 +36,7 @@ namespace detail
template <typename genFIType>
struct Abs_<genFIType, true>
{
static genFIType get(genFIType const & x)
GLM_FUNC_QUALIFIER static genFIType get(genFIType const & x)
{
GLM_STATIC_ASSERT(
detail::type<genFIType>::is_float ||
......@@ -49,7 +49,7 @@ namespace detail
template <typename genFIType>
struct Abs_<genFIType, false>
{
static genFIType get(genFIType const & x)
GLM_FUNC_QUALIFIER static genFIType get(genFIType const & x)
{
GLM_STATIC_ASSERT(
detail::type<genFIType>::is_uint, "'abs' only accept floating-point and integer inputs");
......@@ -275,7 +275,7 @@ namespace detail
//// Only valid if (INT_MIN <= x-y <= INT_MAX)
//// min(x,y)
//r = y + ((x - y) & ((x - y) >> (sizeof(int) *
//CHAR_BIT 1)));
//CHAR_BIT - 1)));
//// max(x,y)
//r = x - ((x - y) & ((x - y) >> (sizeof(int) *
//CHAR_BIT - 1)));
......@@ -420,93 +420,87 @@ namespace detail
}
// mix
template <typename genTypeT, typename genTypeU>
GLM_FUNC_QUALIFIER genTypeT mix
template <typename genType>
GLM_FUNC_QUALIFIER genType mix
(
genTypeT const & x,
genTypeT const & y,
genTypeU const & a
genType const & x,
genType const & y,
genType const & a
)
{
// It could be a vector too
//GLM_STATIC_ASSERT(
// detail::type<genTypeT>::is_float &&
// detail::type<genTypeU>::is_float);
GLM_STATIC_ASSERT(detail::type<genType>::is_float , "'genType' is not floating-point type");
//return x + a * (y - x);
return genTypeT(genTypeU(x) + a * genTypeU(y - x));
return x + a * (y - x);
}
template <typename valTypeA, typename valTypeB>
GLM_FUNC_QUALIFIER detail::tvec2<valTypeA> mix
template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec2<valType> mix
(
detail::tvec2<valTypeA> const & x,
detail::tvec2<valTypeA> const & y,
valTypeB const & a
detail::tvec2<valType> const & x,
detail::tvec2<valType> const & y,
valType const & a
)
{
return detail::tvec2<valTypeA>(
detail::tvec2<valTypeB>(x) + a * detail::tvec2<valTypeB>(y - x));
GLM_STATIC_ASSERT(detail::type<valType>::is_float , "'genType' is not floating-point type");
return x + a * (y - x);
}
template <typename valTypeA, typename valTypeB>
GLM_FUNC_QUALIFIER detail::tvec3<valTypeA> mix
template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec3<valType> mix
(
detail::tvec3<valTypeA> const & x,
detail::tvec3<valTypeA> const & y,
valTypeB const & a
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y,
valType const & a
)
{
return detail::tvec3<valTypeA>(
detail::tvec3<valTypeB>(x) + a * detail::tvec3<valTypeB>(y - x));
return x + a * (y - x);
}
template <typename valTypeA, typename valTypeB>
GLM_FUNC_QUALIFIER detail::tvec4<valTypeA> mix
template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec4<valType> mix
(
detail::tvec4<valTypeA> const & x,
detail::tvec4<valTypeA> const & y,
valTypeB const & a
detail::tvec4<valType> const & x,
detail::tvec4<valType> const & y,
valType const & a
)
{
return detail::tvec4<valTypeA>(
detail::tvec4<valTypeB>(x) + a * detail::tvec4<valTypeB>(y - x));
return x + a * (y - x);
}
template <typename valTypeA, typename valTypeB>
GLM_FUNC_QUALIFIER detail::tvec2<valTypeA> mix
template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec2<valType> mix
(
detail::tvec2<valTypeA> const & x,
detail::tvec2<valTypeA> const & y,
detail::tvec2<valTypeB> const & a
detail::tvec2<valType> const & x,
detail::tvec2<valType> const & y,
detail::tvec2<valType> const & a
)
{
return detail::tvec2<valTypeA>(
detail::tvec2<valTypeB>(x) + a * detail::tvec2<valTypeB>(y - x));
return x + a * (y - x);
}
template <typename valTypeA, typename valTypeB>
GLM_FUNC_QUALIFIER detail::tvec3<valTypeA> mix
template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec3<valType> mix
(
detail::tvec3<valTypeA> const & x,
detail::tvec3<valTypeA> const & y,
detail::tvec3<valTypeB> const & a
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y,
detail::tvec3<valType> const & a
)
{
return detail::tvec3<valTypeA>(
detail::tvec3<valTypeB>(x) + a * detail::tvec3<valTypeB>(y - x));
GLM_STATIC_ASSERT(detail::type<valType>::is_float , "'genType' is not floating-point type");
return x + a * (y - x);
}
template <typename valTypeA, typename valTypeB>
GLM_FUNC_QUALIFIER detail::tvec4<valTypeA> mix
template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec4<valType> mix
(
detail::tvec4<valTypeA> const & x,
detail::tvec4<valTypeA> const & y,
detail::tvec4<valTypeB> const & a
detail::tvec4<valType> const & x,
detail::tvec4<valType> const & y,
detail::tvec4<valType> const & a
)
{
return detail::tvec4<valTypeA>(
detail::tvec4<valTypeB>(x) + a * detail::tvec4<valTypeB>(y - x));
return x + a * (y - x);
}
//template <typename genTypeT>
......@@ -525,15 +519,63 @@ namespace detail
// return x + a * (y - x);
//}
template <typename genType>
GLM_FUNC_QUALIFIER genType mix
template <>
GLM_FUNC_QUALIFIER float mix
(
genType const & x,
genType const & y,
float const & x,
float const & y,
bool const & a
)
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'mix' only accept floating-point inputs");
return a ? y : x;
}
template <>
GLM_FUNC_QUALIFIER double mix
(
double const & x,
double const & y,
bool const & a
)
{
return a ? y : x;
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec2<T> mix
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & y,
bool a
)
{
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'mix' only accept floating-point inputs");
return a ? y : x;
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> mix
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y,
bool a
)
{
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'mix' only accept floating-point inputs");
return a ? y : x;
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec4<T> mix
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & y,
bool a
)
{
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'mix' only accept floating-point inputs");
return a ? y : x;
}
......@@ -552,8 +594,7 @@ namespace detail
for
(
typename detail::tvec2<T>::size_type i = 0;
i < detail::tvec2<T>::value_size();
++i
i < x.length(); ++i
)
{
result[i] = a[i] ? y[i] : x[i];
......@@ -575,8 +616,7 @@ namespace detail
for
(
typename detail::tvec3<T>::size_type i = 0;
i < detail::tvec3<T>::value_size();
++i
i < x.length(); ++i
)
{
result[i] = a[i] ? y[i] : x[i];
......@@ -598,8 +638,7 @@ namespace detail
for
(
typename detail::tvec4<T>::size_type i = 0;
i < detail::tvec4<T>::value_size();
++i
i < x.length(); ++i
)
{
result[i] = a[i] ? y[i] : x[i];
......@@ -803,17 +842,19 @@ namespace detail
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'isnan' only accept floating-point inputs");
# if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL))
# if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL))
return _isnan(x) != 0;
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
# elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isnan(x) != 0;
# else
return std::isnan(x);
# endif
# else
# elif(GLM_COMPILER & GLM_COMPILER_CUDA)
return isnan(x) != 0;
# else
return std::isnan(x);
# endif
# endif
}
template <typename T>
......@@ -858,32 +899,20 @@ namespace detail
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'isinf' only accept floating-point inputs");
# if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC))
# if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC))
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
# elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isinf(x) != 0;
# else
return std::isinf(x);
# endif
# else
# elif(GLM_COMPILER & GLM_COMPILER_CUDA)
// http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/docs/online/group__CUDA__MATH__DOUBLE_g13431dd2b40b51f9139cbb7f50c18fab.html#g13431dd2b40b51f9139cbb7f50c18fab
return isinf(double(x)) != 0;
# else
return std::isinf(x);
# endif
/*
# if(GLM_COMPILER & GLM_COMPILER_VC)
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isinf(x) != 0;
# else
return std::isinf(x);
# endif
# elif(GLM_COMPILER & GLM_COMPILER_INTEL)
return isinf(x) != 0;
# else
return std::isinf(x);
# endif
*/
# endif
}
template <typename T>
......
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
......@@ -41,16 +41,16 @@ namespace glm
/// @addtogroup core_func_exponential
/// @{
/// Returns x raised to the y power.
/// Returns 'base' raised to the power 'exponent'.
///
/// @param x pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.
/// @param y
/// @param base Floating point value. pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.
/// @param exponent Floating point value representing the 'exponent'.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml">GLSL pow man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
genType pow(genType const & x, genType const & y);
GLM_FUNC_DECL genType pow(genType const & base, genType const & exponent);
/// Returns the natural exponentiation of x, i.e., e^x.
///
......@@ -60,7 +60,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml">GLSL exp man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
genType exp(genType const & x);
GLM_FUNC_DECL genType exp(genType const & x);
/// Returns the natural logarithm of x, i.e.,
/// returns the value y which satisfies the equation x = e^y.
......@@ -72,7 +72,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml">GLSL log man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
genType log(genType const & x);
GLM_FUNC_DECL genType log(genType const & x);
/// Returns 2 raised to the x power.
///
......@@ -82,7 +82,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml">GLSL exp2 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
genType exp2(genType const & x);
GLM_FUNC_DECL genType exp2(genType const & x);
/// Returns the base 2 log of x, i.e., returns the value y,
/// which satisfies the equation x = 2 ^ y.
......@@ -93,7 +93,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml">GLSL log2 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
genType log2(genType const & x);
GLM_FUNC_DECL genType log2(genType const & x);
/// Returns the positive square root of x.
///
......@@ -103,7 +103,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml">GLSL sqrt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
genType sqrt(genType const & x);
GLM_FUNC_DECL genType sqrt(genType const & x);
/// Returns the reciprocal of the positive square root of x.
///
......@@ -113,7 +113,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml">GLSL inversesqrt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
genType inversesqrt(genType const & x);
GLM_FUNC_DECL genType inversesqrt(genType const & x);
/// @}
}//namespace glm
......
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
......@@ -146,6 +146,7 @@ namespace _detail
)
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'inversesqrt' only accept floating-point input");
assert(x > genType(0));
return genType(1) / ::std::sqrt(x);
}
......
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
......@@ -48,7 +48,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType>
typename genType::value_type length(
GLM_FUNC_DECL typename genType::value_type length(
genType const & x);
/// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
......@@ -58,7 +58,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml">GLSL distance man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType>
typename genType::value_type distance(
GLM_FUNC_DECL typename genType::value_type distance(
genType const & p0,
genType const & p1);
......@@ -69,7 +69,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType>
typename genType::value_type dot(
GLM_FUNC_DECL typename genType::value_type dot(
genType const & x,
genType const & y);
......@@ -80,7 +80,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename valType>
detail::tvec3<valType> cross(
GLM_FUNC_DECL detail::tvec3<valType> cross(
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y);
......@@ -89,7 +89,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml">GLSL normalize man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType>
genType normalize(
GLM_FUNC_DECL genType normalize(
genType const & x);
/// If dot(Nref, I) < 0.0, return N, otherwise, return -N.
......@@ -99,7 +99,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml">GLSL faceforward man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType>
genType faceforward(
GLM_FUNC_DECL genType faceforward(
genType const & N,
genType const & I,
genType const & Nref);
......@@ -112,7 +112,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/reflect.xml">GLSL reflect man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType>
genType reflect(
GLM_FUNC_DECL genType reflect(
genType const & I,
genType const & N);
......@@ -125,7 +125,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/refract.xml">GLSL refract man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType>
genType refract(
GLM_FUNC_DECL genType refract(
genType const & I,
genType const & N,
typename genType::value_type const & eta);
......
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
......@@ -132,7 +132,6 @@ namespace glm
(
genType const & x,
genType const & y
)
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'dot' only accept floating-point inputs");
......@@ -271,7 +270,7 @@ namespace glm
// reflect
template <typename genType>
genType reflect
GLM_FUNC_QUALIFIER genType reflect
(
genType const & I,
genType const & N
......
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
......@@ -52,7 +52,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uaddCarry.xml">GLSL uaddCarry man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genUType>
genUType uaddCarry(
GLM_FUNC_DECL genUType uaddCarry(
genUType const & x,
genUType const & y,
genUType & carry);
......@@ -66,7 +66,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/usubBorrow.xml">GLSL usubBorrow man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genUType>
genUType usubBorrow(
GLM_FUNC_DECL genUType usubBorrow(
genUType const & x,
genUType const & y,
genUType & borrow);
......@@ -80,7 +80,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/umulExtended.xml">GLSL umulExtended man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genUType>
void umulExtended(
GLM_FUNC_DECL void umulExtended(
genUType const & x,
genUType const & y,
genUType & msb,
......@@ -95,7 +95,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/imulExtended.xml">GLSL imulExtended man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIType>
void imulExtended(
GLM_FUNC_DECL void imulExtended(
genIType const & x,
genIType const & y,
genIType & msb,
......@@ -105,7 +105,7 @@ namespace glm
/// returning them in the least significant bits of the result.
/// For unsigned data types, the most significant bits of the
/// result will be set to zero. For signed data types, the
/// most significant bits will be set to the value of bit offset + base – 1.
/// most significant bits will be set to the value of bit offset + base - 1.
///
/// If bits is zero, the result will be zero. The result will be
/// undefined if offset or bits is negative, or if the sum of
......@@ -117,7 +117,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldExtract.xml">GLSL bitfieldExtract man page</a>