Add GLM_NOEXCEPT to most gtx functions

This commit is contained in:
Jesse Talavera-Greenberg 2015-09-11 19:47:22 -04:00
parent b633ead29f
commit 16202be2a4
93 changed files with 968 additions and 968 deletions

View File

@ -56,28 +56,28 @@ namespace glm
/// Minimum comparison between 2 variables and returns 2 associated variable values /// Minimum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename T, typename U, precision P> template<typename T, typename U, precision P>
GLM_FUNC_DECL U associatedMin(T x, U a, T y, U b); GLM_FUNC_DECL U associatedMin(T x, U a, T y, U b) GLM_NOEXCEPT;
/// Minimum comparison between 2 variables and returns 2 associated variable values /// Minimum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename T, typename U, precision P, template <typename, precision> class vecType> template<typename T, typename U, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL tvec2<U, P> associatedMin( GLM_FUNC_DECL tvec2<U, P> associatedMin(
vecType<T, P> const & x, vecType<U, P> const & a, vecType<T, P> const & x, vecType<U, P> const & a,
vecType<T, P> const & y, vecType<U, P> const & b); vecType<T, P> const & y, vecType<U, P> const & b) GLM_NOEXCEPT;
/// Minimum comparison between 2 variables and returns 2 associated variable values /// Minimum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename T, typename U, precision P, template <typename, precision> class vecType> template<typename T, typename U, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<U, P> associatedMin( GLM_FUNC_DECL vecType<U, P> associatedMin(
T x, const vecType<U, P>& a, T x, const vecType<U, P>& a,
T y, const vecType<U, P>& b); T y, const vecType<U, P>& b) GLM_NOEXCEPT;
/// Minimum comparison between 2 variables and returns 2 associated variable values /// Minimum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename T, typename U, precision P, template <typename, precision> class vecType> template<typename T, typename U, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<U, P> associatedMin( GLM_FUNC_DECL vecType<U, P> associatedMin(
vecType<T, P> const & x, U a, vecType<T, P> const & x, U a,
vecType<T, P> const & y, U b); vecType<T, P> const & y, U b) GLM_NOEXCEPT;
/// Minimum comparison between 3 variables and returns 3 associated variable values /// Minimum comparison between 3 variables and returns 3 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -85,7 +85,7 @@ namespace glm
GLM_FUNC_DECL U associatedMin( GLM_FUNC_DECL U associatedMin(
T x, U a, T x, U a,
T y, U b, T y, U b,
T z, U c); T z, U c) GLM_NOEXCEPT;
/// Minimum comparison between 3 variables and returns 3 associated variable values /// Minimum comparison between 3 variables and returns 3 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -93,7 +93,7 @@ namespace glm
GLM_FUNC_DECL vecType<U, P> associatedMin( GLM_FUNC_DECL vecType<U, P> associatedMin(
vecType<T, P> const & x, vecType<U, P> const & a, vecType<T, P> const & x, vecType<U, P> const & a,
vecType<T, P> const & y, vecType<U, P> const & b, vecType<T, P> const & y, vecType<U, P> const & b,
vecType<T, P> const & z, vecType<U, P> const & c); vecType<T, P> const & z, vecType<U, P> const & c) GLM_NOEXCEPT;
/// Minimum comparison between 4 variables and returns 4 associated variable values /// Minimum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -102,7 +102,7 @@ namespace glm
T x, U a, T x, U a,
T y, U b, T y, U b,
T z, U c, T z, U c,
T w, U d); T w, U d) GLM_NOEXCEPT;
/// Minimum comparison between 4 variables and returns 4 associated variable values /// Minimum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -111,7 +111,7 @@ namespace glm
vecType<T, P> const & x, vecType<U, P> const & a, vecType<T, P> const & x, vecType<U, P> const & a,
vecType<T, P> const & y, vecType<U, P> const & b, vecType<T, P> const & y, vecType<U, P> const & b,
vecType<T, P> const & z, vecType<U, P> const & c, vecType<T, P> const & z, vecType<U, P> const & c,
vecType<T, P> const & w, vecType<U, P> const & d); vecType<T, P> const & w, vecType<U, P> const & d) GLM_NOEXCEPT;
/// Minimum comparison between 4 variables and returns 4 associated variable values /// Minimum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -120,7 +120,7 @@ namespace glm
T x, vecType<U, P> const & a, T x, vecType<U, P> const & a,
T y, vecType<U, P> const & b, T y, vecType<U, P> const & b,
T z, vecType<U, P> const & c, T z, vecType<U, P> const & c,
T w, vecType<U, P> const & d); T w, vecType<U, P> const & d) GLM_NOEXCEPT;
/// Minimum comparison between 4 variables and returns 4 associated variable values /// Minimum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -129,33 +129,33 @@ namespace glm
vecType<T, P> const & x, U a, vecType<T, P> const & x, U a,
vecType<T, P> const & y, U b, vecType<T, P> const & y, U b,
vecType<T, P> const & z, U c, vecType<T, P> const & z, U c,
vecType<T, P> const & w, U d); vecType<T, P> const & w, U d) GLM_NOEXCEPT;
/// Maximum comparison between 2 variables and returns 2 associated variable values /// Maximum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename T, typename U> template<typename T, typename U>
GLM_FUNC_DECL U associatedMax(T x, U a, T y, U b); GLM_FUNC_DECL U associatedMax(T x, U a, T y, U b) GLM_NOEXCEPT;
/// Maximum comparison between 2 variables and returns 2 associated variable values /// Maximum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename T, typename U, precision P, template <typename, precision> class vecType> template<typename T, typename U, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL tvec2<U, P> associatedMax( GLM_FUNC_DECL tvec2<U, P> associatedMax(
vecType<T, P> const & x, vecType<U, P> const & a, vecType<T, P> const & x, vecType<U, P> const & a,
vecType<T, P> const & y, vecType<U, P> const & b); vecType<T, P> const & y, vecType<U, P> const & b) GLM_NOEXCEPT;
/// Maximum comparison between 2 variables and returns 2 associated variable values /// Maximum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename T, typename U, precision P, template <typename, precision> class vecType> template<typename T, typename U, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> associatedMax( GLM_FUNC_DECL vecType<T, P> associatedMax(
T x, vecType<U, P> const & a, T x, vecType<U, P> const & a,
T y, vecType<U, P> const & b); T y, vecType<U, P> const & b) GLM_NOEXCEPT;
/// Maximum comparison between 2 variables and returns 2 associated variable values /// Maximum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename T, typename U, precision P, template <typename, precision> class vecType> template<typename T, typename U, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<U, P> associatedMax( GLM_FUNC_DECL vecType<U, P> associatedMax(
vecType<T, P> const & x, U a, vecType<T, P> const & x, U a,
vecType<T, P> const & y, U b); vecType<T, P> const & y, U b) GLM_NOEXCEPT;
/// Maximum comparison between 3 variables and returns 3 associated variable values /// Maximum comparison between 3 variables and returns 3 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -163,7 +163,7 @@ namespace glm
GLM_FUNC_DECL U associatedMax( GLM_FUNC_DECL U associatedMax(
T x, U a, T x, U a,
T y, U b, T y, U b,
T z, U c); T z, U c) GLM_NOEXCEPT;
/// Maximum comparison between 3 variables and returns 3 associated variable values /// Maximum comparison between 3 variables and returns 3 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -171,7 +171,7 @@ namespace glm
GLM_FUNC_DECL vecType<U, P> associatedMax( GLM_FUNC_DECL vecType<U, P> associatedMax(
vecType<T, P> const & x, vecType<U, P> const & a, vecType<T, P> const & x, vecType<U, P> const & a,
vecType<T, P> const & y, vecType<U, P> const & b, vecType<T, P> const & y, vecType<U, P> const & b,
vecType<T, P> const & z, vecType<U, P> const & c); vecType<T, P> const & z, vecType<U, P> const & c) GLM_NOEXCEPT;
/// Maximum comparison between 3 variables and returns 3 associated variable values /// Maximum comparison between 3 variables and returns 3 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -179,7 +179,7 @@ namespace glm
GLM_FUNC_DECL vecType<T, P> associatedMax( GLM_FUNC_DECL vecType<T, P> associatedMax(
T x, vecType<U, P> const & a, T x, vecType<U, P> const & a,
T y, vecType<U, P> const & b, T y, vecType<U, P> const & b,
T z, vecType<U, P> const & c); T z, vecType<U, P> const & c) GLM_NOEXCEPT;
/// Maximum comparison between 3 variables and returns 3 associated variable values /// Maximum comparison between 3 variables and returns 3 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -187,7 +187,7 @@ namespace glm
GLM_FUNC_DECL vecType<U, P> associatedMax( GLM_FUNC_DECL vecType<U, P> associatedMax(
vecType<T, P> const & x, U a, vecType<T, P> const & x, U a,
vecType<T, P> const & y, U b, vecType<T, P> const & y, U b,
vecType<T, P> const & z, U c); vecType<T, P> const & z, U c) GLM_NOEXCEPT;
/// Maximum comparison between 4 variables and returns 4 associated variable values /// Maximum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -196,7 +196,7 @@ namespace glm
T x, U a, T x, U a,
T y, U b, T y, U b,
T z, U c, T z, U c,
T w, U d); T w, U d) GLM_NOEXCEPT;
/// Maximum comparison between 4 variables and returns 4 associated variable values /// Maximum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -205,7 +205,7 @@ namespace glm
vecType<T, P> const & x, vecType<U, P> const & a, vecType<T, P> const & x, vecType<U, P> const & a,
vecType<T, P> const & y, vecType<U, P> const & b, vecType<T, P> const & y, vecType<U, P> const & b,
vecType<T, P> const & z, vecType<U, P> const & c, vecType<T, P> const & z, vecType<U, P> const & c,
vecType<T, P> const & w, vecType<U, P> const & d); vecType<T, P> const & w, vecType<U, P> const & d) GLM_NOEXCEPT;
/// Maximum comparison between 4 variables and returns 4 associated variable values /// Maximum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -214,7 +214,7 @@ namespace glm
T x, vecType<U, P> const & a, T x, vecType<U, P> const & a,
T y, vecType<U, P> const & b, T y, vecType<U, P> const & b,
T z, vecType<U, P> const & c, T z, vecType<U, P> const & c,
T w, vecType<U, P> const & d); T w, vecType<U, P> const & d) GLM_NOEXCEPT;
/// Maximum comparison between 4 variables and returns 4 associated variable values /// Maximum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -223,7 +223,7 @@ namespace glm
vecType<T, P> const & x, U a, vecType<T, P> const & x, U a,
vecType<T, P> const & y, U b, vecType<T, P> const & y, U b,
vecType<T, P> const & z, U c, vecType<T, P> const & z, U c,
vecType<T, P> const & w, U d); vecType<T, P> const & w, U d) GLM_NOEXCEPT;
/// @} /// @}
} //namespace glm } //namespace glm

View File

@ -34,7 +34,7 @@ namespace glm{
// Min comparison between 2 variables // Min comparison between 2 variables
template<typename T, typename U, precision P> template<typename T, typename U, precision P>
GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b) GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b) GLM_NOEXCEPT
{ {
return x < y ? a : b; return x < y ? a : b;
} }
@ -44,7 +44,7 @@ GLM_FUNC_QUALIFIER tvec2<U, P> associatedMin
( (
vecType<T, P> const & x, vecType<U, P> const & a, vecType<T, P> const & x, vecType<U, P> const & a,
vecType<T, P> const & y, vecType<U, P> const & b vecType<T, P> const & y, vecType<U, P> const & b
) ) GLM_NOEXCEPT
{ {
vecType<U, P> Result(uninitialize); vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -57,7 +57,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
( (
T x, const vecType<U, P>& a, T x, const vecType<U, P>& a,
T y, const vecType<U, P>& b T y, const vecType<U, P>& b
) ) GLM_NOEXCEPT
{ {
vecType<U, P> Result(uninitialize); vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -70,7 +70,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
( (
vecType<T, P> const & x, U a, vecType<T, P> const & x, U a,
vecType<T, P> const & y, U b vecType<T, P> const & y, U b
) ) GLM_NOEXCEPT
{ {
vecType<U, P> Result(uninitialize); vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -85,7 +85,7 @@ GLM_FUNC_QUALIFIER U associatedMin
T x, U a, T x, U a,
T y, U b, T y, U b,
T z, U c T z, U c
) ) GLM_NOEXCEPT
{ {
U Result = x < y ? (x < z ? a : c) : (y < z ? b : c); U Result = x < y ? (x < z ? a : c) : (y < z ? b : c);
return Result; return Result;
@ -97,7 +97,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
vecType<T, P> const & x, vecType<U, P> const & a, vecType<T, P> const & x, vecType<U, P> const & a,
vecType<T, P> const & y, vecType<U, P> const & b, vecType<T, P> const & y, vecType<U, P> const & b,
vecType<T, P> const & z, vecType<U, P> const & c vecType<T, P> const & z, vecType<U, P> const & c
) ) GLM_NOEXCEPT
{ {
vecType<U, P> Result(uninitialize); vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -113,7 +113,7 @@ GLM_FUNC_QUALIFIER U associatedMin
T y, U b, T y, U b,
T z, U c, T z, U c,
T w, U d T w, U d
) ) GLM_NOEXCEPT
{ {
T Test1 = min(x, y); T Test1 = min(x, y);
T Test2 = min(z, w);; T Test2 = min(z, w);;
@ -131,7 +131,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
vecType<T, P> const & y, vecType<U, P> const & b, vecType<T, P> const & y, vecType<U, P> const & b,
vecType<T, P> const & z, vecType<U, P> const & c, vecType<T, P> const & z, vecType<U, P> const & c,
vecType<T, P> const & w, vecType<U, P> const & d vecType<T, P> const & w, vecType<U, P> const & d
) ) GLM_NOEXCEPT
{ {
vecType<U, P> Result(uninitialize); vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -153,7 +153,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
T y, vecType<U, P> const & b, T y, vecType<U, P> const & b,
T z, vecType<U, P> const & c, T z, vecType<U, P> const & c,
T w, vecType<U, P> const & d T w, vecType<U, P> const & d
) ) GLM_NOEXCEPT
{ {
T Test1 = min(x, y); T Test1 = min(x, y);
T Test2 = min(z, w); T Test2 = min(z, w);
@ -176,7 +176,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
vecType<T, P> const & y, U b, vecType<T, P> const & y, U b,
vecType<T, P> const & z, U c, vecType<T, P> const & z, U c,
vecType<T, P> const & w, U d vecType<T, P> const & w, U d
) ) GLM_NOEXCEPT
{ {
vecType<U, P> Result(uninitialize); vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -192,7 +192,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
// Max comparison between 2 variables // Max comparison between 2 variables
template<typename T, typename U> template<typename T, typename U>
GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b) GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b) GLM_NOEXCEPT
{ {
return x > y ? a : b; return x > y ? a : b;
} }
@ -203,7 +203,7 @@ GLM_FUNC_QUALIFIER tvec2<U, P> associatedMax
( (
vecType<T, P> const & x, vecType<U, P> const & a, vecType<T, P> const & x, vecType<U, P> const & a,
vecType<T, P> const & y, vecType<U, P> const & b vecType<T, P> const & y, vecType<U, P> const & b
) ) GLM_NOEXCEPT
{ {
vecType<U, P> Result(uninitialize); vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -217,7 +217,7 @@ GLM_FUNC_QUALIFIER vecType<T, P> associatedMax
( (
T x, vecType<U, P> const & a, T x, vecType<U, P> const & a,
T y, vecType<U, P> const & b T y, vecType<U, P> const & b
) ) GLM_NOEXCEPT
{ {
vecType<U, P> Result(uninitialize); vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -231,7 +231,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
( (
vecType<T, P> const & x, U a, vecType<T, P> const & x, U a,
vecType<T, P> const & y, U b vecType<T, P> const & y, U b
) ) GLM_NOEXCEPT
{ {
vecType<T, P> Result(uninitialize); vecType<T, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -246,7 +246,7 @@ GLM_FUNC_QUALIFIER U associatedMax
T x, U a, T x, U a,
T y, U b, T y, U b,
T z, U c T z, U c
) ) GLM_NOEXCEPT
{ {
U Result = x > y ? (x > z ? a : c) : (y > z ? b : c); U Result = x > y ? (x > z ? a : c) : (y > z ? b : c);
return Result; return Result;
@ -259,7 +259,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
vecType<T, P> const & x, vecType<U, P> const & a, vecType<T, P> const & x, vecType<U, P> const & a,
vecType<T, P> const & y, vecType<U, P> const & b, vecType<T, P> const & y, vecType<U, P> const & b,
vecType<T, P> const & z, vecType<U, P> const & c vecType<T, P> const & z, vecType<U, P> const & c
) ) GLM_NOEXCEPT
{ {
vecType<U, P> Result(uninitialize); vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -274,7 +274,7 @@ GLM_FUNC_QUALIFIER vecType<T, P> associatedMax
T x, vecType<U, P> const & a, T x, vecType<U, P> const & a,
T y, vecType<U, P> const & b, T y, vecType<U, P> const & b,
T z, vecType<U, P> const & c T z, vecType<U, P> const & c
) ) GLM_NOEXCEPT
{ {
vecType<U, P> Result(uninitialize); vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -289,7 +289,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
vecType<T, P> const & x, U a, vecType<T, P> const & x, U a,
vecType<T, P> const & y, U b, vecType<T, P> const & y, U b,
vecType<T, P> const & z, U c vecType<T, P> const & z, U c
) ) GLM_NOEXCEPT
{ {
vecType<T, P> Result(uninitialize); vecType<T, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -305,7 +305,7 @@ GLM_FUNC_QUALIFIER U associatedMax
T y, U b, T y, U b,
T z, U c, T z, U c,
T w, U d T w, U d
) ) GLM_NOEXCEPT
{ {
T Test1 = max(x, y); T Test1 = max(x, y);
T Test2 = max(z, w);; T Test2 = max(z, w);;
@ -323,7 +323,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
vecType<T, P> const & y, vecType<U, P> const & b, vecType<T, P> const & y, vecType<U, P> const & b,
vecType<T, P> const & z, vecType<U, P> const & c, vecType<T, P> const & z, vecType<U, P> const & c,
vecType<T, P> const & w, vecType<U, P> const & d vecType<T, P> const & w, vecType<U, P> const & d
) ) GLM_NOEXCEPT
{ {
vecType<U, P> Result(uninitialize); vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
@ -345,7 +345,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
T y, vecType<U, P> const & b, T y, vecType<U, P> const & b,
T z, vecType<U, P> const & c, T z, vecType<U, P> const & c,
T w, vecType<U, P> const & d T w, vecType<U, P> const & d
) ) GLM_NOEXCEPT
{ {
T Test1 = max(x, y); T Test1 = max(x, y);
T Test2 = max(z, w); T Test2 = max(z, w);
@ -368,7 +368,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
vecType<T, P> const & y, U b, vecType<T, P> const & y, U b,
vecType<T, P> const & z, U c, vecType<T, P> const & z, U c,
vecType<T, P> const & w, U d vecType<T, P> const & w, U d
) ) GLM_NOEXCEPT
{ {
vecType<U, P> Result(uninitialize); vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i) for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)

View File

@ -56,13 +56,13 @@ namespace glm
/// @see gtx_bit /// @see gtx_bit
template <typename genIUType> template <typename genIUType>
GLM_FUNC_DECL genIUType highestBitValue(genIUType Value); GLM_FUNC_DECL genIUType highestBitValue(genIUType Value) GLM_NOEXCEPT;
/// Find the highest bit set to 1 in a integer variable and return its value. /// Find the highest bit set to 1 in a integer variable and return its value.
/// ///
/// @see gtx_bit /// @see gtx_bit
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> highestBitValue(vecType<T, P> const & value); GLM_FUNC_DECL vecType<T, P> highestBitValue(vecType<T, P> const & value) GLM_NOEXCEPT;
/// Return the power of two number which value is just higher the input value. /// Return the power of two number which value is just higher the input value.
/// Deprecated, use ceilPowerOfTwo from GTC_round instead /// Deprecated, use ceilPowerOfTwo from GTC_round instead
@ -70,7 +70,7 @@ namespace glm
/// @see gtc_round /// @see gtc_round
/// @see gtx_bit /// @see gtx_bit
template <typename genIUType> template <typename genIUType>
GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value); GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value) GLM_NOEXCEPT;
/// Return the power of two number which value is just higher the input value. /// Return the power of two number which value is just higher the input value.
/// Deprecated, use ceilPowerOfTwo from GTC_round instead /// Deprecated, use ceilPowerOfTwo from GTC_round instead
@ -78,7 +78,7 @@ namespace glm
/// @see gtc_round /// @see gtc_round
/// @see gtx_bit /// @see gtx_bit
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoAbove(vecType<T, P> const & value); GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoAbove(vecType<T, P> const & value) GLM_NOEXCEPT;
/// Return the power of two number which value is just lower the input value. /// Return the power of two number which value is just lower the input value.
/// Deprecated, use floorPowerOfTwo from GTC_round instead /// Deprecated, use floorPowerOfTwo from GTC_round instead
@ -86,7 +86,7 @@ namespace glm
/// @see gtc_round /// @see gtc_round
/// @see gtx_bit /// @see gtx_bit
template <typename genIUType> template <typename genIUType>
GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value); GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value) GLM_NOEXCEPT;
/// Return the power of two number which value is just lower the input value. /// Return the power of two number which value is just lower the input value.
/// Deprecated, use floorPowerOfTwo from GTC_round instead /// Deprecated, use floorPowerOfTwo from GTC_round instead
@ -94,7 +94,7 @@ namespace glm
/// @see gtc_round /// @see gtc_round
/// @see gtx_bit /// @see gtx_bit
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoBelow(vecType<T, P> const & value); GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoBelow(vecType<T, P> const & value) GLM_NOEXCEPT;
/// Return the power of two number which value is the closet to the input value. /// Return the power of two number which value is the closet to the input value.
/// Deprecated, use roundPowerOfTwo from GTC_round instead /// Deprecated, use roundPowerOfTwo from GTC_round instead
@ -102,7 +102,7 @@ namespace glm
/// @see gtc_round /// @see gtc_round
/// @see gtx_bit /// @see gtx_bit
template <typename genIUType> template <typename genIUType>
GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value); GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value) GLM_NOEXCEPT;
/// Return the power of two number which value is the closet to the input value. /// Return the power of two number which value is the closet to the input value.
/// Deprecated, use roundPowerOfTwo from GTC_round instead /// Deprecated, use roundPowerOfTwo from GTC_round instead
@ -110,7 +110,7 @@ namespace glm
/// @see gtc_round /// @see gtc_round
/// @see gtx_bit /// @see gtx_bit
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoNearest(vecType<T, P> const & value); GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoNearest(vecType<T, P> const & value) GLM_NOEXCEPT;
/// @} /// @}
} //namespace glm } //namespace glm

View File

@ -36,7 +36,7 @@ namespace glm
// highestBitValue // highestBitValue
template <typename genIUType> template <typename genIUType>
GLM_FUNC_QUALIFIER genIUType highestBitValue(genIUType Value) GLM_FUNC_QUALIFIER genIUType highestBitValue(genIUType Value) GLM_NOEXCEPT
{ {
genIUType tmp = Value; genIUType tmp = Value;
genIUType result = genIUType(0); genIUType result = genIUType(0);
@ -49,7 +49,7 @@ namespace glm
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> highestBitValue(vecType<T, P> const & v) GLM_FUNC_QUALIFIER vecType<T, P> highestBitValue(vecType<T, P> const & v) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(highestBitValue, v); return detail::functor1<T, T, P, vecType>::call(highestBitValue, v);
} }
@ -58,13 +58,13 @@ namespace glm
// powerOfTwoAbove // powerOfTwoAbove
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType powerOfTwoAbove(genType value) GLM_FUNC_QUALIFIER genType powerOfTwoAbove(genType value) GLM_NOEXCEPT
{ {
return isPowerOfTwo(value) ? value : highestBitValue(value) << 1; return isPowerOfTwo(value) ? value : highestBitValue(value) << 1;
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> powerOfTwoAbove(vecType<T, P> const & v) GLM_FUNC_QUALIFIER vecType<T, P> powerOfTwoAbove(vecType<T, P> const & v) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(powerOfTwoAbove, v); return detail::functor1<T, T, P, vecType>::call(powerOfTwoAbove, v);
} }
@ -73,13 +73,13 @@ namespace glm
// powerOfTwoBelow // powerOfTwoBelow
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType powerOfTwoBelow(genType value) GLM_FUNC_QUALIFIER genType powerOfTwoBelow(genType value) GLM_NOEXCEPT
{ {
return isPowerOfTwo(value) ? value : highestBitValue(value); return isPowerOfTwo(value) ? value : highestBitValue(value);
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> powerOfTwoBelow(vecType<T, P> const & v) GLM_FUNC_QUALIFIER vecType<T, P> powerOfTwoBelow(vecType<T, P> const & v) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(powerOfTwoBelow, v); return detail::functor1<T, T, P, vecType>::call(powerOfTwoBelow, v);
} }
@ -88,7 +88,7 @@ namespace glm
// powerOfTwoNearest // powerOfTwoNearest
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType powerOfTwoNearest(genType value) GLM_FUNC_QUALIFIER genType powerOfTwoNearest(genType value) GLM_NOEXCEPT
{ {
if(isPowerOfTwo(value)) if(isPowerOfTwo(value))
return value; return value;
@ -99,7 +99,7 @@ namespace glm
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> powerOfTwoNearest(vecType<T, P> const & v) GLM_FUNC_QUALIFIER vecType<T, P> powerOfTwoNearest(vecType<T, P> const & v) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(powerOfTwoNearest, v); return detail::functor1<T, T, P, vecType>::call(powerOfTwoNearest, v);
} }

View File

@ -59,14 +59,14 @@ namespace glm
GLM_FUNC_DECL tvec3<T, P> closestPointOnLine( GLM_FUNC_DECL tvec3<T, P> closestPointOnLine(
tvec3<T, P> const & point, tvec3<T, P> const & point,
tvec3<T, P> const & a, tvec3<T, P> const & a,
tvec3<T, P> const & b); tvec3<T, P> const & b) GLM_NOEXCEPT;
/// 2d lines work as well /// 2d lines work as well
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> closestPointOnLine( GLM_FUNC_DECL tvec2<T, P> closestPointOnLine(
tvec2<T, P> const & point, tvec2<T, P> const & point,
tvec2<T, P> const & a, tvec2<T, P> const & a,
tvec2<T, P> const & b); tvec2<T, P> const & b) GLM_NOEXCEPT;
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -38,7 +38,7 @@ namespace glm
tvec3<T, P> const & point, tvec3<T, P> const & point,
tvec3<T, P> const & a, tvec3<T, P> const & a,
tvec3<T, P> const & b tvec3<T, P> const & b
) ) GLM_NOEXCEPT
{ {
T LineLength = distance(a, b); T LineLength = distance(a, b);
tvec3<T, P> Vector = point - a; tvec3<T, P> Vector = point - a;
@ -58,7 +58,7 @@ namespace glm
tvec2<T, P> const & point, tvec2<T, P> const & point,
tvec2<T, P> const & a, tvec2<T, P> const & a,
tvec2<T, P> const & b tvec2<T, P> const & b
) ) GLM_NOEXCEPT
{ {
T LineLength = distance(a, b); T LineLength = distance(a, b);
tvec2<T, P> Vector = point - a; tvec2<T, P> Vector = point - a;

View File

@ -57,39 +57,39 @@ namespace glm
/// @see gtx_color_space /// @see gtx_color_space
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> rgbColor( GLM_FUNC_DECL tvec3<T, P> rgbColor(
tvec3<T, P> const & hsvValue); tvec3<T, P> const & hsvValue) GLM_NOEXCEPT;
/// Converts a color from RGB color space to its color in HSV color space. /// Converts a color from RGB color space to its color in HSV color space.
/// @see gtx_color_space /// @see gtx_color_space
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> hsvColor( GLM_FUNC_DECL tvec3<T, P> hsvColor(
tvec3<T, P> const & rgbValue); tvec3<T, P> const & rgbValue) GLM_NOEXCEPT;
/// Build a saturation matrix. /// Build a saturation matrix.
/// @see gtx_color_space /// @see gtx_color_space
template <typename T> template <typename T>
GLM_FUNC_DECL tmat4x4<T, defaultp> saturation( GLM_FUNC_DECL tmat4x4<T, defaultp> saturation(
T const s); T const s) GLM_NOEXCEPT;
/// Modify the saturation of a color. /// Modify the saturation of a color.
/// @see gtx_color_space /// @see gtx_color_space
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> saturation( GLM_FUNC_DECL tvec3<T, P> saturation(
T const s, T const s,
tvec3<T, P> const & color); tvec3<T, P> const & color) GLM_NOEXCEPT;
/// Modify the saturation of a color. /// Modify the saturation of a color.
/// @see gtx_color_space /// @see gtx_color_space
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> saturation( GLM_FUNC_DECL tvec4<T, P> saturation(
T const s, T const s,
tvec4<T, P> const & color); tvec4<T, P> const & color) GLM_NOEXCEPT;
/// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. /// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
/// @see gtx_color_space /// @see gtx_color_space
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T luminosity( GLM_FUNC_DECL T luminosity(
tvec3<T, P> const & color); tvec3<T, P> const & color) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -33,7 +33,7 @@
namespace glm namespace glm
{ {
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> rgbColor(const tvec3<T, P>& hsvColor) GLM_FUNC_QUALIFIER tvec3<T, P> rgbColor(const tvec3<T, P>& hsvColor) GLM_NOEXCEPT
{ {
tvec3<T, P> hsv = hsvColor; tvec3<T, P> hsv = hsvColor;
tvec3<T, P> rgbColor; tvec3<T, P> rgbColor;
@ -90,7 +90,7 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> hsvColor(const tvec3<T, P>& rgbColor) GLM_FUNC_QUALIFIER tvec3<T, P> hsvColor(const tvec3<T, P>& rgbColor) GLM_NOEXCEPT
{ {
tvec3<T, P> hsv = rgbColor; tvec3<T, P> hsv = rgbColor;
float Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b); float Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b);
@ -130,7 +130,7 @@ namespace glm
} }
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> saturation(T const s) GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> saturation(T const s) GLM_NOEXCEPT
{ {
tvec3<T, defaultp> rgbw = tvec3<T, defaultp>(T(0.2126), T(0.7152), T(0.0722)); tvec3<T, defaultp> rgbw = tvec3<T, defaultp>(T(0.2126), T(0.7152), T(0.0722));
@ -152,19 +152,19 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> saturation(const T s, const tvec3<T, P>& color) GLM_FUNC_QUALIFIER tvec3<T, P> saturation(const T s, const tvec3<T, P>& color) GLM_NOEXCEPT
{ {
return tvec3<T, P>(saturation(s) * tvec4<T, P>(color, T(0))); return tvec3<T, P>(saturation(s) * tvec4<T, P>(color, T(0)));
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> saturation(const T s, const tvec4<T, P>& color) GLM_FUNC_QUALIFIER tvec4<T, P> saturation(const T s, const tvec4<T, P>& color) GLM_NOEXCEPT
{ {
return saturation(s) * color; return saturation(s) * color;
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER T luminosity(const tvec3<T, P>& color) GLM_FUNC_QUALIFIER T luminosity(const tvec3<T, P>& color) GLM_NOEXCEPT
{ {
const tvec3<T, P> tmp = tvec3<T, P>(0.33, 0.59, 0.11); const tvec3<T, P> tmp = tvec3<T, P>(0.33, 0.59, 0.11);
return dot(color, tmp); return dot(color, tmp);

View File

@ -57,27 +57,27 @@ namespace glm
/// @see gtx_color_space_YCoCg /// @see gtx_color_space_YCoCg
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> rgb2YCoCg( GLM_FUNC_DECL tvec3<T, P> rgb2YCoCg(
tvec3<T, P> const & rgbColor); tvec3<T, P> const & rgbColor) GLM_NOEXCEPT;
/// Convert a color from YCoCg color space to RGB color space. /// Convert a color from YCoCg color space to RGB color space.
/// @see gtx_color_space_YCoCg /// @see gtx_color_space_YCoCg
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> YCoCg2rgb( GLM_FUNC_DECL tvec3<T, P> YCoCg2rgb(
tvec3<T, P> const & YCoCgColor); tvec3<T, P> const & YCoCgColor) GLM_NOEXCEPT;
/// Convert a color from RGB color space to YCoCgR color space. /// Convert a color from RGB color space to YCoCgR color space.
/// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
/// @see gtx_color_space_YCoCg /// @see gtx_color_space_YCoCg
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> rgb2YCoCgR( GLM_FUNC_DECL tvec3<T, P> rgb2YCoCgR(
tvec3<T, P> const & rgbColor); tvec3<T, P> const & rgbColor) GLM_NOEXCEPT;
/// Convert a color from YCoCgR color space to RGB color space. /// Convert a color from YCoCgR color space to RGB color space.
/// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
/// @see gtx_color_space_YCoCg /// @see gtx_color_space_YCoCg
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> YCoCgR2rgb( GLM_FUNC_DECL tvec3<T, P> YCoCgR2rgb(
tvec3<T, P> const & YCoCgColor); tvec3<T, P> const & YCoCgColor) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -36,7 +36,7 @@ namespace glm
GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCg GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCg
( (
tvec3<T, P> const & rgbColor tvec3<T, P> const & rgbColor
) ) GLM_NOEXCEPT
{ {
tvec3<T, P> result; tvec3<T, P> result;
result.x/*Y */ = rgbColor.r / T(4) + rgbColor.g / T(2) + rgbColor.b / T(4); result.x/*Y */ = rgbColor.r / T(4) + rgbColor.g / T(2) + rgbColor.b / T(4);
@ -49,7 +49,7 @@ namespace glm
GLM_FUNC_QUALIFIER tvec3<T, P> YCoCg2rgb GLM_FUNC_QUALIFIER tvec3<T, P> YCoCg2rgb
( (
tvec3<T, P> const & YCoCgColor tvec3<T, P> const & YCoCgColor
) ) GLM_NOEXCEPT
{ {
tvec3<T, P> result; tvec3<T, P> result;
result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z; result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z;
@ -64,7 +64,7 @@ namespace glm
static GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCgR static GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCgR
( (
tvec3<T, P> const & rgbColor tvec3<T, P> const & rgbColor
) ) GLM_NOEXCEPT
{ {
tvec3<T, P> result; tvec3<T, P> result;
result.x/*Y */ = rgbColor.g / T(2) + (rgbColor.r + rgbColor.b) / T(4); result.x/*Y */ = rgbColor.g / T(2) + (rgbColor.r + rgbColor.b) / T(4);
@ -76,7 +76,7 @@ namespace glm
static GLM_FUNC_QUALIFIER tvec3<T, P> YCoCgR2rgb static GLM_FUNC_QUALIFIER tvec3<T, P> YCoCgR2rgb
( (
tvec3<T, P> const & YCoCgRColor tvec3<T, P> const & YCoCgRColor
) ) GLM_NOEXCEPT
{ {
tvec3<T, P> result; tvec3<T, P> result;
T tmp = YCoCgRColor.x - (YCoCgRColor.z / T(2)); T tmp = YCoCgRColor.x - (YCoCgRColor.z / T(2));
@ -93,7 +93,7 @@ namespace glm
static GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCgR static GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCgR
( (
tvec3<T, P> const & rgbColor tvec3<T, P> const & rgbColor
) ) GLM_NOEXCEPT
{ {
tvec3<T, P> result; tvec3<T, P> result;
result.y/*Co*/ = rgbColor.r - rgbColor.b; result.y/*Co*/ = rgbColor.r - rgbColor.b;
@ -106,7 +106,7 @@ namespace glm
static GLM_FUNC_QUALIFIER tvec3<T, P> YCoCgR2rgb static GLM_FUNC_QUALIFIER tvec3<T, P> YCoCgR2rgb
( (
tvec3<T, P> const & YCoCgRColor tvec3<T, P> const & YCoCgRColor
) ) GLM_NOEXCEPT
{ {
tvec3<T, P> result; tvec3<T, P> result;
T tmp = YCoCgRColor.x - (YCoCgRColor.z >> 1); T tmp = YCoCgRColor.x - (YCoCgRColor.z >> 1);
@ -121,7 +121,7 @@ namespace glm
GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCgR GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCgR
( (
tvec3<T, P> const & rgbColor tvec3<T, P> const & rgbColor
) ) GLM_NOEXCEPT
{ {
return compute_YCoCgR<T, P, std::numeric_limits<T>::is_integer>::rgb2YCoCgR(rgbColor); return compute_YCoCgR<T, P, std::numeric_limits<T>::is_integer>::rgb2YCoCgR(rgbColor);
} }
@ -130,7 +130,7 @@ namespace glm
GLM_FUNC_QUALIFIER tvec3<T, P> YCoCgR2rgb GLM_FUNC_QUALIFIER tvec3<T, P> YCoCgR2rgb
( (
tvec3<T, P> const & YCoCgRColor tvec3<T, P> const & YCoCgRColor
) ) GLM_NOEXCEPT
{ {
return compute_YCoCgR<T, P, std::numeric_limits<T>::is_integer>::YCoCgR2rgb(YCoCgRColor); return compute_YCoCgR<T, P, std::numeric_limits<T>::is_integer>::YCoCgR2rgb(YCoCgRColor);
} }

View File

@ -66,7 +66,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml">GLSL isnan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml">GLSL isnan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const & x); GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const & x) GLM_NOEXCEPT;
/// Similiar to 'mod' but with a different rounding and integer support. /// Similiar to 'mod' but with a different rounding and integer support.
/// Returns 'x - y * trunc(x/y)' instead of 'x - y * floor(x/y)' /// Returns 'x - y * trunc(x/y)' instead of 'x - y * floor(x/y)'
@ -74,7 +74,7 @@ namespace glm
/// @see <a href="http://stackoverflow.com/questions/7610631/glsl-mod-vs-hlsl-fmod">GLSL mod vs HLSL fmod</a> /// @see <a href="http://stackoverflow.com/questions/7610631/glsl-mod-vs-hlsl-fmod">GLSL mod vs HLSL fmod</a>
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> fmod(vecType<T, P> const & v); GLM_FUNC_DECL vecType<T, P> fmod(vecType<T, P> const & v) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -38,7 +38,7 @@ namespace detail
template <typename T, precision P, template <class, precision> class vecType, bool isFloat = true> template <typename T, precision P, template <class, precision> class vecType, bool isFloat = true>
struct compute_fmod struct compute_fmod
{ {
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & a, vecType<T, P> const & b) GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & a, vecType<T, P> const & b) GLM_NOEXCEPT
{ {
return detail::functor2<T, P, vecType>::call(std::fmod, a, b); return detail::functor2<T, P, vecType>::call(std::fmod, a, b);
} }
@ -47,7 +47,7 @@ namespace detail
template <typename T, precision P, template <class, precision> class vecType> template <typename T, precision P, template <class, precision> class vecType>
struct compute_fmod<T, P, vecType, false> struct compute_fmod<T, P, vecType, false>
{ {
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & a, vecType<T, P> const & b) GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & a, vecType<T, P> const & b) GLM_NOEXCEPT
{ {
return a % b; return a % b;
} }
@ -55,7 +55,7 @@ namespace detail
}//namespace detail }//namespace detail
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER bool isdenormal(T const & x) GLM_FUNC_QUALIFIER bool isdenormal(T const & x) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
@ -70,7 +70,7 @@ namespace detail
GLM_FUNC_QUALIFIER typename tvec1<T, P>::bool_type isdenormal GLM_FUNC_QUALIFIER typename tvec1<T, P>::bool_type isdenormal
( (
tvec1<T, P> const & x tvec1<T, P> const & x
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
@ -82,7 +82,7 @@ namespace detail
GLM_FUNC_QUALIFIER typename tvec2<T, P>::bool_type isdenormal GLM_FUNC_QUALIFIER typename tvec2<T, P>::bool_type isdenormal
( (
tvec2<T, P> const & x tvec2<T, P> const & x
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
@ -95,7 +95,7 @@ namespace detail
GLM_FUNC_QUALIFIER typename tvec3<T, P>::bool_type isdenormal GLM_FUNC_QUALIFIER typename tvec3<T, P>::bool_type isdenormal
( (
tvec3<T, P> const & x tvec3<T, P> const & x
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
@ -109,7 +109,7 @@ namespace detail
GLM_FUNC_QUALIFIER typename tvec4<T, P>::bool_type isdenormal GLM_FUNC_QUALIFIER typename tvec4<T, P>::bool_type isdenormal
( (
tvec4<T, P> const & x tvec4<T, P> const & x
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
@ -122,19 +122,19 @@ namespace detail
// fmod // fmod
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType fmod(genType x, genType y) GLM_FUNC_QUALIFIER genType fmod(genType x, genType y) GLM_NOEXCEPT
{ {
return fmod(tvec1<genType>(x), y).x; return fmod(tvec1<genType>(x), y).x;
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fmod(vecType<T, P> const & x, T y) GLM_FUNC_QUALIFIER vecType<T, P> fmod(vecType<T, P> const & x, T y) GLM_NOEXCEPT
{ {
return detail::compute_fmod<T, P, vecType, std::numeric_limits<T>::is_iec559>::call(x, vecType<T, P>(y)); return detail::compute_fmod<T, P, vecType, std::numeric_limits<T>::is_iec559>::call(x, vecType<T, P>(y));
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fmod(vecType<T, P> const & x, vecType<T, P> const & y) GLM_FUNC_QUALIFIER vecType<T, P> fmod(vecType<T, P> const & x, vecType<T, P> const & y) GLM_NOEXCEPT
{ {
return detail::compute_fmod<T, P, vecType, std::numeric_limits<T>::is_iec559>::call(x, y); return detail::compute_fmod<T, P, vecType, std::numeric_limits<T>::is_iec559>::call(x, y);
} }

View File

@ -64,30 +64,30 @@ namespace glm
/// @addtogroup gtx_compatibility /// @addtogroup gtx_compatibility
/// @{ /// @{
template <typename T> GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) template <typename T> GLM_FUNC_QUALIFIER T lerp(T x, T y, T a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> lerp(const tvec2<T, P>& x, const tvec2<T, P>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> lerp(const tvec2<T, P>& x, const tvec2<T, P>& y, T a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> lerp(const tvec3<T, P>& x, const tvec3<T, P>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> lerp(const tvec3<T, P>& x, const tvec3<T, P>& y, T a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> lerp(const tvec4<T, P>& x, const tvec4<T, P>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> lerp(const tvec4<T, P>& x, const tvec4<T, P>& y, T a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> lerp(const tvec2<T, P>& x, const tvec2<T, P>& y, const tvec2<T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> lerp(const tvec2<T, P>& x, const tvec2<T, P>& y, const tvec2<T, P>& a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> lerp(const tvec3<T, P>& x, const tvec3<T, P>& y, const tvec3<T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> lerp(const tvec3<T, P>& x, const tvec3<T, P>& y, const tvec3<T, P>& a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> lerp(const tvec4<T, P>& x, const tvec4<T, P>& y, const tvec4<T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> lerp(const tvec4<T, P>& x, const tvec4<T, P>& y, const tvec4<T, P>& a) GLM_NOEXCEPT {return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER T saturate(T x) GLM_NOEXCEPT {return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> saturate(const tvec2<T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> saturate(const tvec2<T, P>& x) GLM_NOEXCEPT {return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> saturate(const tvec3<T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> saturate(const tvec3<T, P>& x) GLM_NOEXCEPT {return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> saturate(const tvec4<T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> saturate(const tvec4<T, P>& x) GLM_NOEXCEPT {return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER T atan2(T x, T y) GLM_NOEXCEPT {return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> atan2(const tvec2<T, P>& x, const tvec2<T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> atan2(const tvec2<T, P>& x, const tvec2<T, P>& y) GLM_NOEXCEPT {return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> atan2(const tvec3<T, P>& x, const tvec3<T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> atan2(const tvec3<T, P>& x, const tvec3<T, P>& y) GLM_NOEXCEPT {return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> atan2(const tvec4<T, P>& x, const tvec4<T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> atan2(const tvec4<T, P>& x, const tvec4<T, P>& y) GLM_NOEXCEPT {return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
template <typename genType> GLM_FUNC_DECL bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) template <typename genType> GLM_FUNC_DECL bool isfinite(genType const & x) GLM_NOEXCEPT; //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_DECL tvec1<bool, P> isfinite(const tvec1<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_DECL tvec1<bool, P> isfinite(const tvec1<T, P>& x) GLM_NOEXCEPT; //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_DECL tvec2<bool, P> isfinite(const tvec2<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_DECL tvec2<bool, P> isfinite(const tvec2<T, P>& x) GLM_NOEXCEPT; //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_DECL tvec3<bool, P> isfinite(const tvec3<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_DECL tvec3<bool, P> isfinite(const tvec3<T, P>& x) GLM_NOEXCEPT; //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
template <typename T, precision P> GLM_FUNC_DECL tvec4<bool, P> isfinite(const tvec4<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) template <typename T, precision P> GLM_FUNC_DECL tvec4<bool, P> isfinite(const tvec4<T, P>& x) GLM_NOEXCEPT; //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension) typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension)
typedef tvec2<bool, highp> bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension) typedef tvec2<bool, highp> bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension)

View File

@ -37,7 +37,7 @@ namespace glm
// isfinite // isfinite
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER bool isfinite( GLM_FUNC_QUALIFIER bool isfinite(
genType const & x) genType const & x) GLM_NOEXCEPT
{ {
# if GLM_HAS_CXX11_STL # if GLM_HAS_CXX11_STL
return std::isfinite(x) != 0; return std::isfinite(x) != 0;
@ -55,7 +55,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<bool, P> isfinite( GLM_FUNC_QUALIFIER tvec1<bool, P> isfinite(
tvec1<T, P> const & x) tvec1<T, P> const & x) GLM_NOEXCEPT
{ {
return tvec1<bool, P>( return tvec1<bool, P>(
isfinite(x.x)); isfinite(x.x));
@ -63,7 +63,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<bool, P> isfinite( GLM_FUNC_QUALIFIER tvec2<bool, P> isfinite(
tvec2<T, P> const & x) tvec2<T, P> const & x) GLM_NOEXCEPT
{ {
return tvec2<bool, P>( return tvec2<bool, P>(
isfinite(x.x), isfinite(x.x),
@ -72,7 +72,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<bool, P> isfinite( GLM_FUNC_QUALIFIER tvec3<bool, P> isfinite(
tvec3<T, P> const & x) tvec3<T, P> const & x) GLM_NOEXCEPT
{ {
return tvec3<bool, P>( return tvec3<bool, P>(
isfinite(x.x), isfinite(x.x),
@ -82,7 +82,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<bool, P> isfinite( GLM_FUNC_QUALIFIER tvec4<bool, P> isfinite(
tvec4<T, P> const & x) tvec4<T, P> const & x) GLM_NOEXCEPT
{ {
return tvec4<bool, P>( return tvec4<bool, P>(
isfinite(x.x), isfinite(x.x),

View File

@ -58,25 +58,25 @@ namespace glm
/// @see gtx_component_wise /// @see gtx_component_wise
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type compAdd( GLM_FUNC_DECL typename genType::value_type compAdd(
genType const & v); genType const & v) GLM_NOEXCEPT;
/// Multiply all vector components together. /// Multiply all vector components together.
/// @see gtx_component_wise /// @see gtx_component_wise
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type compMul( GLM_FUNC_DECL typename genType::value_type compMul(
genType const & v); genType const & v) GLM_NOEXCEPT;
/// Find the minimum value between single vector components. /// Find the minimum value between single vector components.
/// @see gtx_component_wise /// @see gtx_component_wise
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type compMin( GLM_FUNC_DECL typename genType::value_type compMin(
genType const & v); genType const & v) GLM_NOEXCEPT;
/// Find the maximum value between single vector components. /// Find the maximum value between single vector components.
/// @see gtx_component_wise /// @see gtx_component_wise
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type compMax( GLM_FUNC_DECL typename genType::value_type compMax(
genType const & v); genType const & v) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -33,7 +33,7 @@
namespace glm namespace glm
{ {
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T compAdd(vecType<T, P> const & v) GLM_FUNC_QUALIFIER T compAdd(vecType<T, P> const & v) GLM_NOEXCEPT
{ {
T result(0); T result(0);
for(detail::component_count_t i = 0; i < detail::component_count(v); ++i) for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
@ -42,7 +42,7 @@ namespace glm
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T compMul(vecType<T, P> const & v) GLM_FUNC_QUALIFIER T compMul(vecType<T, P> const & v) GLM_NOEXCEPT
{ {
T result(1); T result(1);
for(detail::component_count_t i = 0; i < detail::component_count(v); ++i) for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
@ -51,7 +51,7 @@ namespace glm
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T compMin(vecType<T, P> const & v) GLM_FUNC_QUALIFIER T compMin(vecType<T, P> const & v) GLM_NOEXCEPT
{ {
T result(v[0]); T result(v[0]);
for(detail::component_count_t i = 1; i < detail::component_count(v); ++i) for(detail::component_count_t i = 1; i < detail::component_count(v); ++i)
@ -60,7 +60,7 @@ namespace glm
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T compMax(vecType<T, P> const & v) GLM_FUNC_QUALIFIER T compMax(vecType<T, P> const & v) GLM_NOEXCEPT
{ {
T result(v[0]); T result(v[0]);
for(detail::component_count_t i = 1; i < detail::component_count(v); ++i) for(detail::component_count_t i = 1; i < detail::component_count(v); ++i)

View File

@ -58,61 +58,61 @@ namespace glm
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleX( GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleX(
T const & angleX); T const & angleX) GLM_NOEXCEPT;
/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y. /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleY( GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleY(
T const & angleY); T const & angleY) GLM_NOEXCEPT;
/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z. /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleZ( GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleZ(
T const & angleZ); T const & angleZ) GLM_NOEXCEPT;
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleXY( GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleXY(
T const & angleX, T const & angleX,
T const & angleY); T const & angleY) GLM_NOEXCEPT;
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleYX( GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleYX(
T const & angleY, T const & angleY,
T const & angleX); T const & angleX) GLM_NOEXCEPT;
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleXZ( GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleXZ(
T const & angleX, T const & angleX,
T const & angleZ); T const & angleZ) GLM_NOEXCEPT;
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleZX( GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleZX(
T const & angle, T const & angle,
T const & angleX); T const & angleX) GLM_NOEXCEPT;
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleYZ( GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleYZ(
T const & angleY, T const & angleY,
T const & angleZ); T const & angleZ) GLM_NOEXCEPT;
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleZY( GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleZY(
T const & angleZ, T const & angleZ,
T const & angleY); T const & angleY) GLM_NOEXCEPT;
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
@ -120,7 +120,7 @@ namespace glm
GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleXYZ( GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleXYZ(
T const & t1, T const & t1,
T const & t2, T const & t2,
T const & t3); T const & t3) GLM_NOEXCEPT;
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
@ -128,7 +128,7 @@ namespace glm
GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleYXZ( GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleYXZ(
T const & yaw, T const & yaw,
T const & pitch, T const & pitch,
T const & roll); T const & roll) GLM_NOEXCEPT;
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
@ -136,27 +136,27 @@ namespace glm
GLM_FUNC_DECL tmat4x4<T, defaultp> yawPitchRoll( GLM_FUNC_DECL tmat4x4<T, defaultp> yawPitchRoll(
T const & yaw, T const & yaw,
T const & pitch, T const & pitch,
T const & roll); T const & roll) GLM_NOEXCEPT;
/// Creates a 2D 2 * 2 rotation matrix from an euler angle. /// Creates a 2D 2 * 2 rotation matrix from an euler angle.
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL tmat2x2<T, defaultp> orientate2(T const & angle); GLM_FUNC_DECL tmat2x2<T, defaultp> orientate2(T const & angle) GLM_NOEXCEPT;
/// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle. /// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T> template <typename T>
GLM_FUNC_DECL tmat3x3<T, defaultp> orientate3(T const & angle); GLM_FUNC_DECL tmat3x3<T, defaultp> orientate3(T const & angle) GLM_NOEXCEPT;
/// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). /// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> orientate3(tvec3<T, P> const & angles); GLM_FUNC_DECL tmat3x3<T, P> orientate3(tvec3<T, P> const & angles) GLM_NOEXCEPT;
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> orientate4(tvec3<T, P> const & angles); GLM_FUNC_DECL tmat4x4<T, P> orientate4(tvec3<T, P> const & angles) GLM_NOEXCEPT;
/// Extracts the (X * Y * Z) Euler angles from the rotation matrix M /// Extracts the (X * Y * Z) Euler angles from the rotation matrix M
/// @see gtx_euler_angles /// @see gtx_euler_angles
@ -164,7 +164,7 @@ namespace glm
GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4<T, defaultp> & M, GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4<T, defaultp> & M,
T & t1, T & t1,
T & t2, T & t2,
T & t3); T & t3) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -38,7 +38,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleX GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleX
( (
T const & angleX T const & angleX
) ) GLM_NOEXCEPT
{ {
T cosX = glm::cos(angleX); T cosX = glm::cos(angleX);
T sinX = glm::sin(angleX); T sinX = glm::sin(angleX);
@ -54,7 +54,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleY GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleY
( (
T const & angleY T const & angleY
) ) GLM_NOEXCEPT
{ {
T cosY = glm::cos(angleY); T cosY = glm::cos(angleY);
T sinY = glm::sin(angleY); T sinY = glm::sin(angleY);
@ -70,7 +70,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleZ GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleZ
( (
T const & angleZ T const & angleZ
) ) GLM_NOEXCEPT
{ {
T cosZ = glm::cos(angleZ); T cosZ = glm::cos(angleZ);
T sinZ = glm::sin(angleZ); T sinZ = glm::sin(angleZ);
@ -87,7 +87,7 @@ namespace glm
( (
T const & angleX, T const & angleX,
T const & angleY T const & angleY
) ) GLM_NOEXCEPT
{ {
T cosX = glm::cos(angleX); T cosX = glm::cos(angleX);
T sinX = glm::sin(angleX); T sinX = glm::sin(angleX);
@ -106,7 +106,7 @@ namespace glm
( (
T const & angleY, T const & angleY,
T const & angleX T const & angleX
) ) GLM_NOEXCEPT
{ {
T cosX = glm::cos(angleX); T cosX = glm::cos(angleX);
T sinX = glm::sin(angleX); T sinX = glm::sin(angleX);
@ -125,7 +125,7 @@ namespace glm
( (
T const & angleX, T const & angleX,
T const & angleZ T const & angleZ
) ) GLM_NOEXCEPT
{ {
return eulerAngleX(angleX) * eulerAngleZ(angleZ); return eulerAngleX(angleX) * eulerAngleZ(angleZ);
} }
@ -135,7 +135,7 @@ namespace glm
( (
T const & angleZ, T const & angleZ,
T const & angleX T const & angleX
) ) GLM_NOEXCEPT
{ {
return eulerAngleZ(angleZ) * eulerAngleX(angleX); return eulerAngleZ(angleZ) * eulerAngleX(angleX);
} }
@ -145,7 +145,7 @@ namespace glm
( (
T const & angleY, T const & angleY,
T const & angleZ T const & angleZ
) ) GLM_NOEXCEPT
{ {
return eulerAngleY(angleY) * eulerAngleZ(angleZ); return eulerAngleY(angleY) * eulerAngleZ(angleZ);
} }
@ -155,7 +155,7 @@ namespace glm
( (
T const & angleZ, T const & angleZ,
T const & angleY T const & angleY
) ) GLM_NOEXCEPT
{ {
return eulerAngleZ(angleZ) * eulerAngleY(angleY); return eulerAngleZ(angleZ) * eulerAngleY(angleY);
} }
@ -166,7 +166,7 @@ namespace glm
T const & t1, T const & t1,
T const & t2, T const & t2,
T const & t3 T const & t3
) ) GLM_NOEXCEPT
{ {
T c1 = glm::cos(-t1); T c1 = glm::cos(-t1);
T c2 = glm::cos(-t2); T c2 = glm::cos(-t2);
@ -201,7 +201,7 @@ namespace glm
T const & yaw, T const & yaw,
T const & pitch, T const & pitch,
T const & roll T const & roll
) ) GLM_NOEXCEPT
{ {
T tmp_ch = glm::cos(yaw); T tmp_ch = glm::cos(yaw);
T tmp_sh = glm::sin(yaw); T tmp_sh = glm::sin(yaw);
@ -236,7 +236,7 @@ namespace glm
T const & yaw, T const & yaw,
T const & pitch, T const & pitch,
T const & roll T const & roll
) ) GLM_NOEXCEPT
{ {
T tmp_ch = glm::cos(yaw); T tmp_ch = glm::cos(yaw);
T tmp_sh = glm::sin(yaw); T tmp_sh = glm::sin(yaw);
@ -269,7 +269,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat2x2<T, defaultp> orientate2 GLM_FUNC_QUALIFIER tmat2x2<T, defaultp> orientate2
( (
T const & angle T const & angle
) ) GLM_NOEXCEPT
{ {
T c = glm::cos(angle); T c = glm::cos(angle);
T s = glm::sin(angle); T s = glm::sin(angle);
@ -286,7 +286,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat3x3<T, defaultp> orientate3 GLM_FUNC_QUALIFIER tmat3x3<T, defaultp> orientate3
( (
T const & angle T const & angle
) ) GLM_NOEXCEPT
{ {
T c = glm::cos(angle); T c = glm::cos(angle);
T s = glm::sin(angle); T s = glm::sin(angle);
@ -308,7 +308,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat3x3<T, P> orientate3 GLM_FUNC_QUALIFIER tmat3x3<T, P> orientate3
( (
tvec3<T, P> const & angles tvec3<T, P> const & angles
) ) GLM_NOEXCEPT
{ {
return tmat3x3<T, P>(yawPitchRoll(angles.z, angles.x, angles.y)); return tmat3x3<T, P>(yawPitchRoll(angles.z, angles.x, angles.y));
} }
@ -317,7 +317,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x4<T, P> orientate4 GLM_FUNC_QUALIFIER tmat4x4<T, P> orientate4
( (
tvec3<T, P> const & angles tvec3<T, P> const & angles
) ) GLM_NOEXCEPT
{ {
return yawPitchRoll(angles.z, angles.x, angles.y); return yawPitchRoll(angles.z, angles.x, angles.y);
} }
@ -326,7 +326,7 @@ namespace glm
GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4<T, defaultp> & M, GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4<T, defaultp> & M,
T & t1, T & t1,
T & t2, T & t2,
T & t3) T & t3) GLM_NOEXCEPT
{ {
float T1 = glm::atan2<T, defaultp>(M[2][1], M[2][2]); float T1 = glm::atan2<T, defaultp>(M[2][1], M[2][2]);
float C2 = glm::sqrt(M[0][0]*M[0][0] + M[1][0]*M[1][0]); float C2 = glm::sqrt(M[0][0]*M[0][0] + M[1][0]*M[1][0]);

View File

@ -59,7 +59,7 @@ namespace glm
GLM_FUNC_DECL genType extend( GLM_FUNC_DECL genType extend(
genType const & Origin, genType const & Origin,
genType const & Source, genType const & Source,
typename genType::value_type const Length); typename genType::value_type const Length) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -38,7 +38,7 @@ namespace glm
genType const & Origin, genType const & Origin,
genType const & Source, genType const & Source,
genType const & Distance genType const & Distance
) ) GLM_NOEXCEPT
{ {
return Origin + (Source - Origin) * Distance; return Origin + (Source - Origin) * Distance;
} }
@ -49,7 +49,7 @@ namespace glm
tvec2<T, P> const & Origin, tvec2<T, P> const & Origin,
tvec2<T, P> const & Source, tvec2<T, P> const & Source,
T const & Distance T const & Distance
) ) GLM_NOEXCEPT
{ {
return Origin + (Source - Origin) * Distance; return Origin + (Source - Origin) * Distance;
} }
@ -60,7 +60,7 @@ namespace glm
tvec3<T, P> const & Origin, tvec3<T, P> const & Origin,
tvec3<T, P> const & Source, tvec3<T, P> const & Source,
T const & Distance T const & Distance
) ) GLM_NOEXCEPT
{ {
return Origin + (Source - Origin) * Distance; return Origin + (Source - Origin) * Distance;
} }
@ -71,7 +71,7 @@ namespace glm
tvec4<T, P> const & Origin, tvec4<T, P> const & Origin,
tvec4<T, P> const & Source, tvec4<T, P> const & Source,
T const & Distance T const & Distance
) ) GLM_NOEXCEPT
{ {
return Origin + (Source - Origin) * Distance; return Origin + (Source - Origin) * Distance;
} }

View File

@ -60,7 +60,7 @@ namespace glm
GLM_FUNC_DECL T min( GLM_FUNC_DECL T min(
T const & x, T const & x,
T const & y, T const & y,
T const & z); T const & z) GLM_NOEXCEPT;
/// Return the minimum component-wise values of 3 inputs /// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
@ -68,7 +68,7 @@ namespace glm
GLM_FUNC_DECL C<T> min( GLM_FUNC_DECL C<T> min(
C<T> const & x, C<T> const & x,
typename C<T>::T const & y, typename C<T>::T const & y,
typename C<T>::T const & z); typename C<T>::T const & z) GLM_NOEXCEPT;
/// Return the minimum component-wise values of 3 inputs /// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
@ -76,7 +76,7 @@ namespace glm
GLM_FUNC_DECL C<T> min( GLM_FUNC_DECL C<T> min(
C<T> const & x, C<T> const & x,
C<T> const & y, C<T> const & y,
C<T> const & z); C<T> const & z) GLM_NOEXCEPT;
/// Return the minimum component-wise values of 4 inputs /// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
@ -85,7 +85,7 @@ namespace glm
T const & x, T const & x,
T const & y, T const & y,
T const & z, T const & z,
T const & w); T const & w) GLM_NOEXCEPT;
/// Return the minimum component-wise values of 4 inputs /// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
@ -94,7 +94,7 @@ namespace glm
C<T> const & x, C<T> const & x,
typename C<T>::T const & y, typename C<T>::T const & y,
typename C<T>::T const & z, typename C<T>::T const & z,
typename C<T>::T const & w); typename C<T>::T const & w) GLM_NOEXCEPT;
/// Return the minimum component-wise values of 4 inputs /// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
@ -103,7 +103,7 @@ namespace glm
C<T> const & x, C<T> const & x,
C<T> const & y, C<T> const & y,
C<T> const & z, C<T> const & z,
C<T> const & w); C<T> const & w) GLM_NOEXCEPT;
/// Return the maximum component-wise values of 3 inputs /// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
@ -111,7 +111,7 @@ namespace glm
GLM_FUNC_DECL T max( GLM_FUNC_DECL T max(
T const & x, T const & x,
T const & y, T const & y,
T const & z); T const & z) GLM_NOEXCEPT;
/// Return the maximum component-wise values of 3 inputs /// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
@ -119,7 +119,7 @@ namespace glm
GLM_FUNC_DECL C<T> max( GLM_FUNC_DECL C<T> max(
C<T> const & x, C<T> const & x,
typename C<T>::T const & y, typename C<T>::T const & y,
typename C<T>::T const & z); typename C<T>::T const & z) GLM_NOEXCEPT;
/// Return the maximum component-wise values of 3 inputs /// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
@ -127,7 +127,7 @@ namespace glm
GLM_FUNC_DECL C<T> max( GLM_FUNC_DECL C<T> max(
C<T> const & x, C<T> const & x,
C<T> const & y, C<T> const & y,
C<T> const & z); C<T> const & z) GLM_NOEXCEPT;
/// Return the maximum component-wise values of 4 inputs /// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
@ -136,7 +136,7 @@ namespace glm
T const & x, T const & x,
T const & y, T const & y,
T const & z, T const & z,
T const & w); T const & w) GLM_NOEXCEPT;
/// Return the maximum component-wise values of 4 inputs /// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
@ -145,7 +145,7 @@ namespace glm
C<T> const & x, C<T> const & x,
typename C<T>::T const & y, typename C<T>::T const & y,
typename C<T>::T const & z, typename C<T>::T const & z,
typename C<T>::T const & w); typename C<T>::T const & w) GLM_NOEXCEPT;
/// Return the maximum component-wise values of 4 inputs /// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
@ -154,7 +154,7 @@ namespace glm
C<T> const & x, C<T> const & x,
C<T> const & y, C<T> const & y,
C<T> const & z, C<T> const & z,
C<T> const & w); C<T> const & w) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -36,7 +36,7 @@ namespace glm
GLM_FUNC_QUALIFIER T min( GLM_FUNC_QUALIFIER T min(
T const & x, T const & x,
T const & y, T const & y,
T const & z) T const & z) GLM_NOEXCEPT
{ {
return glm::min(glm::min(x, y), z); return glm::min(glm::min(x, y), z);
} }
@ -47,7 +47,7 @@ namespace glm
C<T> const & x, C<T> const & x,
typename C<T>::T const & y, typename C<T>::T const & y,
typename C<T>::T const & z typename C<T>::T const & z
) ) GLM_NOEXCEPT
{ {
return glm::min(glm::min(x, y), z); return glm::min(glm::min(x, y), z);
} }
@ -58,7 +58,7 @@ namespace glm
C<T> const & x, C<T> const & x,
C<T> const & y, C<T> const & y,
C<T> const & z C<T> const & z
) ) GLM_NOEXCEPT
{ {
return glm::min(glm::min(x, y), z); return glm::min(glm::min(x, y), z);
} }
@ -70,7 +70,7 @@ namespace glm
T const & y, T const & y,
T const & z, T const & z,
T const & w T const & w
) ) GLM_NOEXCEPT
{ {
return glm::min(glm::min(x, y), glm::min(z, w)); return glm::min(glm::min(x, y), glm::min(z, w));
} }
@ -82,7 +82,7 @@ namespace glm
typename C<T>::T const & y, typename C<T>::T const & y,
typename C<T>::T const & z, typename C<T>::T const & z,
typename C<T>::T const & w typename C<T>::T const & w
) ) GLM_NOEXCEPT
{ {
return glm::min(glm::min(x, y), glm::min(z, w)); return glm::min(glm::min(x, y), glm::min(z, w));
} }
@ -94,7 +94,7 @@ namespace glm
C<T> const & y, C<T> const & y,
C<T> const & z, C<T> const & z,
C<T> const & w C<T> const & w
) ) GLM_NOEXCEPT
{ {
return glm::min(glm::min(x, y), glm::min(z, w)); return glm::min(glm::min(x, y), glm::min(z, w));
} }
@ -103,7 +103,7 @@ namespace glm
GLM_FUNC_QUALIFIER T max( GLM_FUNC_QUALIFIER T max(
T const & x, T const & x,
T const & y, T const & y,
T const & z) T const & z) GLM_NOEXCEPT
{ {
return glm::max(glm::max(x, y), z); return glm::max(glm::max(x, y), z);
} }
@ -114,7 +114,7 @@ namespace glm
C<T> const & x, C<T> const & x,
typename C<T>::T const & y, typename C<T>::T const & y,
typename C<T>::T const & z typename C<T>::T const & z
) ) GLM_NOEXCEPT
{ {
return glm::max(glm::max(x, y), z); return glm::max(glm::max(x, y), z);
} }
@ -125,7 +125,7 @@ namespace glm
C<T> const & x, C<T> const & x,
C<T> const & y, C<T> const & y,
C<T> const & z C<T> const & z
) ) GLM_NOEXCEPT
{ {
return glm::max(glm::max(x, y), z); return glm::max(glm::max(x, y), z);
} }
@ -137,7 +137,7 @@ namespace glm
T const & y, T const & y,
T const & z, T const & z,
T const & w T const & w
) ) GLM_NOEXCEPT
{ {
return glm::max(glm::max(x, y), glm::max(z, w)); return glm::max(glm::max(x, y), glm::max(z, w));
} }
@ -149,7 +149,7 @@ namespace glm
typename C<T>::T const & y, typename C<T>::T const & y,
typename C<T>::T const & z, typename C<T>::T const & z,
typename C<T>::T const & w typename C<T>::T const & w
) ) GLM_NOEXCEPT
{ {
return glm::max(glm::max(x, y), glm::max(z, w)); return glm::max(glm::max(x, y), glm::max(z, w));
} }
@ -161,7 +161,7 @@ namespace glm
C<T> const & y, C<T> const & y,
C<T> const & z, C<T> const & z,
C<T> const & w C<T> const & w
) ) GLM_NOEXCEPT
{ {
return glm::max(glm::max(x, y), glm::max(z, w)); return glm::max(glm::max(x, y), glm::max(z, w));
} }

View File

@ -57,62 +57,62 @@ namespace glm
/// Faster than the common pow function but less accurate. /// Faster than the common pow function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType fastPow(genType x, genType y); GLM_FUNC_DECL genType fastPow(genType x, genType y) GLM_NOEXCEPT;
/// Faster than the common pow function but less accurate. /// Faster than the common pow function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> fastPow(vecType<T, P> const & x, vecType<T, P> const & y); GLM_FUNC_DECL vecType<T, P> fastPow(vecType<T, P> const & x, vecType<T, P> const & y) GLM_NOEXCEPT;
/// Faster than the common pow function but less accurate. /// Faster than the common pow function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename genTypeT, typename genTypeU> template <typename genTypeT, typename genTypeU>
GLM_FUNC_DECL genTypeT fastPow(genTypeT x, genTypeU y); GLM_FUNC_DECL genTypeT fastPow(genTypeT x, genTypeU y) GLM_NOEXCEPT;
/// Faster than the common pow function but less accurate. /// Faster than the common pow function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> fastPow(vecType<T, P> const & x); GLM_FUNC_DECL vecType<T, P> fastPow(vecType<T, P> const & x) GLM_NOEXCEPT;
/// Faster than the common exp function but less accurate. /// Faster than the common exp function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T> template <typename T>
GLM_FUNC_DECL T fastExp(T x); GLM_FUNC_DECL T fastExp(T x) GLM_NOEXCEPT;
/// Faster than the common exp function but less accurate. /// Faster than the common exp function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> fastExp(vecType<T, P> const & x); GLM_FUNC_DECL vecType<T, P> fastExp(vecType<T, P> const & x) GLM_NOEXCEPT;
/// Faster than the common log function but less accurate. /// Faster than the common log function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T> template <typename T>
GLM_FUNC_DECL T fastLog(T x); GLM_FUNC_DECL T fastLog(T x) GLM_NOEXCEPT;
/// Faster than the common exp2 function but less accurate. /// Faster than the common exp2 function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> fastLog(vecType<T, P> const & x); GLM_FUNC_DECL vecType<T, P> fastLog(vecType<T, P> const & x) GLM_NOEXCEPT;
/// Faster than the common exp2 function but less accurate. /// Faster than the common exp2 function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T> template <typename T>
GLM_FUNC_DECL T fastExp2(T x); GLM_FUNC_DECL T fastExp2(T x) GLM_NOEXCEPT;
/// Faster than the common exp2 function but less accurate. /// Faster than the common exp2 function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> fastExp2(vecType<T, P> const & x); GLM_FUNC_DECL vecType<T, P> fastExp2(vecType<T, P> const & x) GLM_NOEXCEPT;
/// Faster than the common log2 function but less accurate. /// Faster than the common log2 function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T> template <typename T>
GLM_FUNC_DECL T fastLog2(T x); GLM_FUNC_DECL T fastLog2(T x) GLM_NOEXCEPT;
/// Faster than the common log2 function but less accurate. /// Faster than the common log2 function but less accurate.
/// @see gtx_fast_exponential /// @see gtx_fast_exponential
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> fastLog2(vecType<T, P> const & x); GLM_FUNC_DECL vecType<T, P> fastLog2(vecType<T, P> const & x) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -34,19 +34,19 @@ namespace glm
{ {
// fastPow: // fastPow:
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType fastPow(genType x, genType y) GLM_FUNC_QUALIFIER genType fastPow(genType x, genType y) GLM_NOEXCEPT
{ {
return exp(y * log(x)); return exp(y * log(x));
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastPow(vecType<T, P> const & x, vecType<T, P> const & y) GLM_FUNC_QUALIFIER vecType<T, P> fastPow(vecType<T, P> const & x, vecType<T, P> const & y) GLM_NOEXCEPT
{ {
return exp(y * log(x)); return exp(y * log(x));
} }
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER T fastPow(T x, int y) GLM_FUNC_QUALIFIER T fastPow(T x, int y) GLM_NOEXCEPT
{ {
T f = static_cast<T>(1); T f = static_cast<T>(1);
for(int i = 0; i < y; ++i) for(int i = 0; i < y; ++i)
@ -55,7 +55,7 @@ namespace glm
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastPow(vecType<T, P> const & x, vecType<int, P> const & y) GLM_FUNC_QUALIFIER vecType<T, P> fastPow(vecType<T, P> const & x, vecType<int, P> const & y) GLM_NOEXCEPT
{ {
vecType<T, P> Result(uninitialize); vecType<T, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
@ -66,7 +66,7 @@ namespace glm
// fastExp // fastExp
// Note: This function provides accurate results only for value between -1 and 1, else avoid it. // Note: This function provides accurate results only for value between -1 and 1, else avoid it.
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER T fastExp(T x) GLM_FUNC_QUALIFIER T fastExp(T x) GLM_NOEXCEPT
{ {
// This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower. // This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower.
// return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f)))); // return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f))));
@ -77,7 +77,7 @@ namespace glm
return T(1) + x + (x2 * T(0.5)) + (x3 * T(0.1666666667)) + (x4 * T(0.041666667)) + (x5 * T(0.008333333333)); return T(1) + x + (x2 * T(0.5)) + (x3 * T(0.1666666667)) + (x4 * T(0.041666667)) + (x5 * T(0.008333333333));
} }
/* // Try to handle all values of float... but often shower than std::exp, glm::floor and the loop kill the performance /* // Try to handle all values of float... but often shower than std::exp, glm::floor and the loop kill the performance
GLM_FUNC_QUALIFIER float fastExp(float x) GLM_FUNC_QUALIFIER float fastExp(float x) GLM_NOEXCEPT
{ {
const float e = 2.718281828f; const float e = 2.718281828f;
const float IntegerPart = floor(x); const float IntegerPart = floor(x);
@ -95,7 +95,7 @@ namespace glm
} }
// Increase accuracy on number bigger that 1 and smaller than -1 but it's not enough for high and negative numbers // Increase accuracy on number bigger that 1 and smaller than -1 but it's not enough for high and negative numbers
GLM_FUNC_QUALIFIER float fastExp(float x) GLM_FUNC_QUALIFIER float fastExp(float x) GLM_NOEXCEPT
{ {
// This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower. // This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower.
// return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f)))); // return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f))));
@ -111,20 +111,20 @@ namespace glm
*/ */
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastExp(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastExp(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(fastExp, x); return detail::functor1<T, T, P, vecType>::call(fastExp, x);
} }
// fastLog // fastLog
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType fastLog(genType x) GLM_FUNC_QUALIFIER genType fastLog(genType x) GLM_NOEXCEPT
{ {
return std::log(x); return std::log(x);
} }
/* Slower than the VC7.1 function... /* Slower than the VC7.1 function...
GLM_FUNC_QUALIFIER float fastLog(float x) GLM_FUNC_QUALIFIER float fastLog(float x) GLM_NOEXCEPT
{ {
float y1 = (x - 1.0f) / (x + 1.0f); float y1 = (x - 1.0f) / (x + 1.0f);
float y2 = y1 * y1; float y2 = y1 * y1;
@ -133,33 +133,33 @@ namespace glm
*/ */
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastLog(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastLog(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(fastLog, x); return detail::functor1<T, T, P, vecType>::call(fastLog, x);
} }
//fastExp2, ln2 = 0.69314718055994530941723212145818f //fastExp2, ln2 = 0.69314718055994530941723212145818f
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType fastExp2(genType x) GLM_FUNC_QUALIFIER genType fastExp2(genType x) GLM_NOEXCEPT
{ {
return fastExp(0.69314718055994530941723212145818f * x); return fastExp(0.69314718055994530941723212145818f * x);
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastExp2(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastExp2(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(fastExp2, x); return detail::functor1<T, T, P, vecType>::call(fastExp2, x);
} }
// fastLog2, ln2 = 0.69314718055994530941723212145818f // fastLog2, ln2 = 0.69314718055994530941723212145818f
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType fastLog2(genType x) GLM_FUNC_QUALIFIER genType fastLog2(genType x) GLM_NOEXCEPT
{ {
return fastLog(x) / 0.69314718055994530941723212145818f; return fastLog(x) / 0.69314718055994530941723212145818f;
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastLog2(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastLog2(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(fastLog2, x); return detail::functor1<T, T, P, vecType>::call(fastLog2, x);
} }

View File

@ -61,55 +61,55 @@ namespace glm
/// ///
/// @see gtx_fast_square_root extension. /// @see gtx_fast_square_root extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType fastSqrt(genType x); GLM_FUNC_DECL genType fastSqrt(genType x) GLM_NOEXCEPT;
/// Faster than the common sqrt function but less accurate. /// Faster than the common sqrt function but less accurate.
/// ///
/// @see gtx_fast_square_root extension. /// @see gtx_fast_square_root extension.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> fastSqrt(vecType<T, P> const & x); GLM_FUNC_DECL vecType<T, P> fastSqrt(vecType<T, P> const & x) GLM_NOEXCEPT;
/// Faster than the common inversesqrt function but less accurate. /// Faster than the common inversesqrt function but less accurate.
/// ///
/// @see gtx_fast_square_root extension. /// @see gtx_fast_square_root extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType fastInverseSqrt(genType x); GLM_FUNC_DECL genType fastInverseSqrt(genType x) GLM_NOEXCEPT;
/// Faster than the common inversesqrt function but less accurate. /// Faster than the common inversesqrt function but less accurate.
/// ///
/// @see gtx_fast_square_root extension. /// @see gtx_fast_square_root extension.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> fastInverseSqrt(vecType<T, P> const & x); GLM_FUNC_DECL vecType<T, P> fastInverseSqrt(vecType<T, P> const & x) GLM_NOEXCEPT;
/// Faster than the common length function but less accurate. /// Faster than the common length function but less accurate.
/// ///
/// @see gtx_fast_square_root extension. /// @see gtx_fast_square_root extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType fastLength(genType x); GLM_FUNC_DECL genType fastLength(genType x) GLM_NOEXCEPT;
/// Faster than the common length function but less accurate. /// Faster than the common length function but less accurate.
/// ///
/// @see gtx_fast_square_root extension. /// @see gtx_fast_square_root extension.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL T fastLength(vecType<T, P> const & x); GLM_FUNC_DECL T fastLength(vecType<T, P> const & x) GLM_NOEXCEPT;
/// Faster than the common distance function but less accurate. /// Faster than the common distance function but less accurate.
/// ///
/// @see gtx_fast_square_root extension. /// @see gtx_fast_square_root extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType fastDistance(genType x, genType y); GLM_FUNC_DECL genType fastDistance(genType x, genType y) GLM_NOEXCEPT;
/// Faster than the common distance function but less accurate. /// Faster than the common distance function but less accurate.
/// ///
/// @see gtx_fast_square_root extension. /// @see gtx_fast_square_root extension.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL T fastDistance(vecType<T, P> const & x, vecType<T, P> const & y); GLM_FUNC_DECL T fastDistance(vecType<T, P> const & x, vecType<T, P> const & y) GLM_NOEXCEPT;
/// Faster than the common normalize function but less accurate. /// Faster than the common normalize function but less accurate.
/// ///
/// @see gtx_fast_square_root extension. /// @see gtx_fast_square_root extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType fastNormalize(genType const & x); GLM_FUNC_DECL genType fastNormalize(genType const & x) GLM_NOEXCEPT;
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -34,7 +34,7 @@ namespace glm
{ {
// fastSqrt // fastSqrt
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType fastSqrt(genType x) GLM_FUNC_QUALIFIER genType fastSqrt(genType x) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fastSqrt' only accept floating-point input"); GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fastSqrt' only accept floating-point input");
@ -42,14 +42,14 @@ namespace glm
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastSqrt(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastSqrt(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(fastSqrt, x); return detail::functor1<T, T, P, vecType>::call(fastSqrt, x);
} }
// fastInversesqrt // fastInversesqrt
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType fastInverseSqrt(genType x) GLM_FUNC_QUALIFIER genType fastInverseSqrt(genType x) GLM_NOEXCEPT
{ {
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6 # ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
tvec1<T, P> tmp(detail::compute_inversesqrt<tvec1, genType, lowp>::call(tvec1<genType, lowp>(x))); tvec1<T, P> tmp(detail::compute_inversesqrt<tvec1, genType, lowp>::call(tvec1<genType, lowp>(x)));
@ -60,14 +60,14 @@ namespace glm
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastInverseSqrt(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastInverseSqrt(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::compute_inversesqrt<vecType, T, P>::call(x); return detail::compute_inversesqrt<vecType, T, P>::call(x);
} }
// fastLength // fastLength
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType fastLength(genType x) GLM_FUNC_QUALIFIER genType fastLength(genType x) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fastLength' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fastLength' only accept floating-point inputs");
@ -75,7 +75,7 @@ namespace glm
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T fastLength(vecType<T, P> const & x) GLM_FUNC_QUALIFIER T fastLength(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fastLength' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fastLength' only accept floating-point inputs");
@ -84,26 +84,26 @@ namespace glm
// fastDistance // fastDistance
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType fastDistance(genType x, genType y) GLM_FUNC_QUALIFIER genType fastDistance(genType x, genType y) GLM_NOEXCEPT
{ {
return fastLength(y - x); return fastLength(y - x);
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T fastDistance(vecType<T, P> const & x, vecType<T, P> const & y) GLM_FUNC_QUALIFIER T fastDistance(vecType<T, P> const & x, vecType<T, P> const & y) GLM_NOEXCEPT
{ {
return fastLength(y - x); return fastLength(y - x);
} }
// fastNormalize // fastNormalize
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType fastNormalize(genType x) GLM_FUNC_QUALIFIER genType fastNormalize(genType x) GLM_NOEXCEPT
{ {
return x > genType(0) ? genType(1) : -genType(1); return x > genType(0) ? genType(1) : -genType(1);
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastNormalize(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastNormalize(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return x * fastInverseSqrt(dot(x, x)); return x * fastInverseSqrt(dot(x, x));
} }

View File

@ -56,47 +56,47 @@ namespace glm
/// Wrap an angle to [0 2pi[ /// Wrap an angle to [0 2pi[
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T wrapAngle(T angle); GLM_FUNC_DECL T wrapAngle(T angle) GLM_NOEXCEPT;
/// Faster than the common sin function but less accurate. /// Faster than the common sin function but less accurate.
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastSin(T angle); GLM_FUNC_DECL T fastSin(T angle) GLM_NOEXCEPT;
/// Faster than the common cos function but less accurate. /// Faster than the common cos function but less accurate.
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastCos(T angle); GLM_FUNC_DECL T fastCos(T angle) GLM_NOEXCEPT;
/// Faster than the common tan function but less accurate. /// Faster than the common tan function but less accurate.
/// Defined between -2pi and 2pi. /// Defined between -2pi and 2pi.
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastTan(T angle); GLM_FUNC_DECL T fastTan(T angle) GLM_NOEXCEPT;
/// Faster than the common asin function but less accurate. /// Faster than the common asin function but less accurate.
/// Defined between -2pi and 2pi. /// Defined between -2pi and 2pi.
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastAsin(T angle); GLM_FUNC_DECL T fastAsin(T angle) GLM_NOEXCEPT;
/// Faster than the common acos function but less accurate. /// Faster than the common acos function but less accurate.
/// Defined between -2pi and 2pi. /// Defined between -2pi and 2pi.
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastAcos(T angle); GLM_FUNC_DECL T fastAcos(T angle) GLM_NOEXCEPT;
/// Faster than the common atan function but less accurate. /// Faster than the common atan function but less accurate.
/// Defined between -2pi and 2pi. /// Defined between -2pi and 2pi.
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastAtan(T y, T x); GLM_FUNC_DECL T fastAtan(T y, T x) GLM_NOEXCEPT;
/// Faster than the common atan function but less accurate. /// Faster than the common atan function but less accurate.
/// Defined between -2pi and 2pi. /// Defined between -2pi and 2pi.
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T fastAtan(T angle); GLM_FUNC_DECL T fastAtan(T angle) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -34,7 +34,7 @@ namespace glm{
namespace detail namespace detail
{ {
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> taylorCos(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> taylorCos(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return static_cast<T>(1) return static_cast<T>(1)
- (x * x) / 2.f - (x * x) / 2.f
@ -44,14 +44,14 @@ namespace detail
} }
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER T cos_52s(T x) GLM_FUNC_QUALIFIER T cos_52s(T x) GLM_NOEXCEPT
{ {
T const xx(x * x); T const xx(x * x);
return (T(0.9999932946) + xx * (T(-0.4999124376) + xx * (T(0.0414877472) + xx * T(-0.0012712095)))); return (T(0.9999932946) + xx * (T(-0.4999124376) + xx * (T(0.0414877472) + xx * T(-0.0012712095))));
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> cos_52s(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> cos_52s(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(cos_52s, x); return detail::functor1<T, T, P, vecType>::call(cos_52s, x);
} }
@ -59,20 +59,20 @@ namespace detail
// wrapAngle // wrapAngle
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER T wrapAngle(T angle) GLM_FUNC_QUALIFIER T wrapAngle(T angle) GLM_NOEXCEPT
{ {
return abs<T>(mod<T>(angle, two_pi<T>())); return abs<T>(mod<T>(angle, two_pi<T>()));
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> wrapAngle(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> wrapAngle(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(wrapAngle, x); return detail::functor1<T, T, P, vecType>::call(wrapAngle, x);
} }
// cos // cos
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER T fastCos(T x) GLM_FUNC_QUALIFIER T fastCos(T x) GLM_NOEXCEPT
{ {
T const angle(wrapAngle<T>(x)); T const angle(wrapAngle<T>(x));
@ -87,85 +87,85 @@ namespace detail
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastCos(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastCos(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(fastCos, x); return detail::functor1<T, T, P, vecType>::call(fastCos, x);
} }
// sin // sin
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER T fastSin(T x) GLM_FUNC_QUALIFIER T fastSin(T x) GLM_NOEXCEPT
{ {
return fastCos<T>(half_pi<T>() - x); return fastCos<T>(half_pi<T>() - x);
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastSin(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastSin(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(fastSin, x); return detail::functor1<T, T, P, vecType>::call(fastSin, x);
} }
// tan // tan
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER T fastTan(T x) GLM_FUNC_QUALIFIER T fastTan(T x) GLM_NOEXCEPT
{ {
return x + (x * x * x * T(0.3333333333)) + (x * x * x * x * x * T(0.1333333333333)) + (x * x * x * x * x * x * x * T(0.0539682539)); return x + (x * x * x * T(0.3333333333)) + (x * x * x * x * x * T(0.1333333333333)) + (x * x * x * x * x * x * x * T(0.0539682539));
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastTan(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastTan(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(fastTan, x); return detail::functor1<T, T, P, vecType>::call(fastTan, x);
} }
// asin // asin
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER T fastAsin(T x) GLM_FUNC_QUALIFIER T fastAsin(T x) GLM_NOEXCEPT
{ {
return x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159)); return x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159));
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastAsin(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastAsin(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(fastAsin, x); return detail::functor1<T, T, P, vecType>::call(fastAsin, x);
} }
// acos // acos
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER T fastAcos(T x) GLM_FUNC_QUALIFIER T fastAcos(T x) GLM_NOEXCEPT
{ {
return T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2) return T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2)
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastAcos(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastAcos(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(fastAcos, x); return detail::functor1<T, T, P, vecType>::call(fastAcos, x);
} }
// atan // atan
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER T fastAtan(T y, T x) GLM_FUNC_QUALIFIER T fastAtan(T y, T x) GLM_NOEXCEPT
{ {
T sgn = sign(y) * sign(x); T sgn = sign(y) * sign(x);
return abs(fastAtan(y / x)) * sgn; return abs(fastAtan(y / x)) * sgn;
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastAtan(vecType<T, P> const & y, vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastAtan(vecType<T, P> const & y, vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor2<T, P, vecType>::call(fastAtan, y, x); return detail::functor2<T, P, vecType>::call(fastAtan, y, x);
} }
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER T fastAtan(T x) GLM_FUNC_QUALIFIER T fastAtan(T x) GLM_NOEXCEPT
{ {
return x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909)); return x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909));
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> fastAtan(vecType<T, P> const & x) GLM_FUNC_QUALIFIER vecType<T, P> fastAtan(vecType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::functor1<T, T, P, vecType>::call(fastAtan, x); return detail::functor1<T, T, P, vecType>::call(fastAtan, x);
} }

View File

@ -61,7 +61,7 @@ namespace glm
tvec2<T, P> const & Center, tvec2<T, P> const & Center,
T const & Radius, T const & Radius,
tvec2<T, P> const & Focal, tvec2<T, P> const & Focal,
tvec2<T, P> const & Position); tvec2<T, P> const & Position) GLM_NOEXCEPT;
/// Return a color from a linear gradient. /// Return a color from a linear gradient.
/// @see - gtx_gradient_paint /// @see - gtx_gradient_paint
@ -69,7 +69,7 @@ namespace glm
GLM_FUNC_DECL T linearGradient( GLM_FUNC_DECL T linearGradient(
tvec2<T, P> const & Point0, tvec2<T, P> const & Point0,
tvec2<T, P> const & Point1, tvec2<T, P> const & Point1,
tvec2<T, P> const & Position); tvec2<T, P> const & Position) GLM_NOEXCEPT;
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -39,7 +39,7 @@ namespace glm
T const & Radius, T const & Radius,
tvec2<T, P> const & Focal, tvec2<T, P> const & Focal,
tvec2<T, P> const & Position tvec2<T, P> const & Position
) ) GLM_NOEXCEPT
{ {
tvec2<T, P> F = Focal - Center; tvec2<T, P> F = Focal - Center;
tvec2<T, P> D = Position - Focal; tvec2<T, P> D = Position - Focal;
@ -58,7 +58,7 @@ namespace glm
tvec2<T, P> const & Point0, tvec2<T, P> const & Point0,
tvec2<T, P> const & Point1, tvec2<T, P> const & Point1,
tvec2<T, P> const & Position tvec2<T, P> const & Position
) ) GLM_NOEXCEPT
{ {
tvec2<T, P> Dist = Point1 - Point0; tvec2<T, P> Dist = Point1 - Point0;
return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist);

View File

@ -59,7 +59,7 @@ namespace glm
GLM_FUNC_DECL bool rightHanded( GLM_FUNC_DECL bool rightHanded(
tvec3<T, P> const & tangent, tvec3<T, P> const & tangent,
tvec3<T, P> const & binormal, tvec3<T, P> const & binormal,
tvec3<T, P> const & normal); tvec3<T, P> const & normal) GLM_NOEXCEPT;
//! Return if a trihedron left handed or not. //! Return if a trihedron left handed or not.
//! From GLM_GTX_handed_coordinate_space extension. //! From GLM_GTX_handed_coordinate_space extension.
@ -67,7 +67,7 @@ namespace glm
GLM_FUNC_DECL bool leftHanded( GLM_FUNC_DECL bool leftHanded(
tvec3<T, P> const & tangent, tvec3<T, P> const & tangent,
tvec3<T, P> const & binormal, tvec3<T, P> const & binormal,
tvec3<T, P> const & normal); tvec3<T, P> const & normal) GLM_NOEXCEPT;
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -38,7 +38,7 @@ namespace glm
tvec3<T, P> const & tangent, tvec3<T, P> const & tangent,
tvec3<T, P> const & binormal, tvec3<T, P> const & binormal,
tvec3<T, P> const & normal tvec3<T, P> const & normal
) ) GLM_NOEXCEPT
{ {
return dot(cross(normal, tangent), binormal) > T(0); return dot(cross(normal, tangent), binormal) > T(0);
} }
@ -49,7 +49,7 @@ namespace glm
tvec3<T, P> const & tangent, tvec3<T, P> const & tangent,
tvec3<T, P> const & binormal, tvec3<T, P> const & binormal,
tvec3<T, P> const & normal tvec3<T, P> const & normal
) ) GLM_NOEXCEPT
{ {
return dot(cross(normal, tangent), binormal) < T(0); return dot(cross(normal, tangent), binormal) < T(0);
} }

View File

@ -56,24 +56,24 @@ namespace glm
//! Returns x raised to the y power. //! Returns x raised to the y power.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL int pow(int x, int y); GLM_FUNC_DECL int pow(int x, int y) GLM_NOEXCEPT;
//! Returns the positive square root of x. //! Returns the positive square root of x.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL int sqrt(int x); GLM_FUNC_DECL int sqrt(int x) GLM_NOEXCEPT;
//! Returns the floor log2 of x. //! Returns the floor log2 of x.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL unsigned int floor_log2(unsigned int x); GLM_FUNC_DECL unsigned int floor_log2(unsigned int x) GLM_NOEXCEPT;
//! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL int mod(int x, int y); GLM_FUNC_DECL int mod(int x, int y) GLM_NOEXCEPT;
//! Return the factorial value of a number (!12 max, integer only) //! Return the factorial value of a number (!12 max, integer only)
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType factorial(genType const & x); GLM_FUNC_DECL genType factorial(genType const & x) GLM_NOEXCEPT;
//! 32bit signed integer. //! 32bit signed integer.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
@ -81,19 +81,19 @@ namespace glm
//! Returns x raised to the y power. //! Returns x raised to the y power.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL uint pow(uint x, uint y); GLM_FUNC_DECL uint pow(uint x, uint y) GLM_NOEXCEPT;
//! Returns the positive square root of x. //! Returns the positive square root of x.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL uint sqrt(uint x); GLM_FUNC_DECL uint sqrt(uint x) GLM_NOEXCEPT;
//! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL uint mod(uint x, uint y); GLM_FUNC_DECL uint mod(uint x, uint y) GLM_NOEXCEPT;
//! Returns the number of leading zeros. //! Returns the number of leading zeros.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL uint nlz(uint x); GLM_FUNC_DECL uint nlz(uint x) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -33,7 +33,7 @@
namespace glm namespace glm
{ {
// pow // pow
GLM_FUNC_QUALIFIER int pow(int x, int y) GLM_FUNC_QUALIFIER int pow(int x, int y) GLM_NOEXCEPT
{ {
if(y == 0) if(y == 0)
return 1; return 1;
@ -44,7 +44,7 @@ namespace glm
} }
// sqrt: From Christopher J. Musial, An integer square root, Graphics Gems, 1990, page 387 // sqrt: From Christopher J. Musial, An integer square root, Graphics Gems, 1990, page 387
GLM_FUNC_QUALIFIER int sqrt(int x) GLM_FUNC_QUALIFIER int sqrt(int x) GLM_NOEXCEPT
{ {
if(x <= 1) return x; if(x <= 1) return x;
@ -63,7 +63,7 @@ namespace glm
// Henry Gordon Dietz: http://aggregate.org/MAGIC/ // Henry Gordon Dietz: http://aggregate.org/MAGIC/
namespace detail namespace detail
{ {
GLM_FUNC_QUALIFIER unsigned int ones32(unsigned int x) GLM_FUNC_QUALIFIER unsigned int ones32(unsigned int x) GLM_NOEXCEPT
{ {
/* 32-bit recursive reduction using SWAR... /* 32-bit recursive reduction using SWAR...
but first step is mapping 2-bit values but first step is mapping 2-bit values
@ -80,7 +80,7 @@ namespace detail
// Henry Gordon Dietz: http://aggregate.org/MAGIC/ // Henry Gordon Dietz: http://aggregate.org/MAGIC/
/* /*
GLM_FUNC_QUALIFIER unsigned int floor_log2(unsigned int x) GLM_FUNC_QUALIFIER unsigned int floor_log2(unsigned int x) GLM_NOEXCEPT
{ {
x |= (x >> 1); x |= (x >> 1);
x |= (x >> 2); x |= (x >> 2);
@ -92,14 +92,14 @@ namespace detail
} }
*/ */
// mod // mod
GLM_FUNC_QUALIFIER int mod(int x, int y) GLM_FUNC_QUALIFIER int mod(int x, int y) GLM_NOEXCEPT
{ {
return x - y * (x / y); return x - y * (x / y);
} }
// factorial (!12 max, integer only) // factorial (!12 max, integer only)
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType factorial(genType const & x) GLM_FUNC_QUALIFIER genType factorial(genType const & x) GLM_NOEXCEPT
{ {
genType Temp = x; genType Temp = x;
genType Result; genType Result;
@ -110,7 +110,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> factorial( GLM_FUNC_QUALIFIER tvec2<T, P> factorial(
tvec2<T, P> const & x) tvec2<T, P> const & x) GLM_NOEXCEPT
{ {
return tvec2<T, P>( return tvec2<T, P>(
factorial(x.x), factorial(x.x),
@ -119,7 +119,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> factorial( GLM_FUNC_QUALIFIER tvec3<T, P> factorial(
tvec3<T, P> const & x) tvec3<T, P> const & x) GLM_NOEXCEPT
{ {
return tvec3<T, P>( return tvec3<T, P>(
factorial(x.x), factorial(x.x),
@ -129,7 +129,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> factorial( GLM_FUNC_QUALIFIER tvec4<T, P> factorial(
tvec4<T, P> const & x) tvec4<T, P> const & x) GLM_NOEXCEPT
{ {
return tvec4<T, P>( return tvec4<T, P>(
factorial(x.x), factorial(x.x),
@ -138,7 +138,7 @@ namespace detail
factorial(x.w)); factorial(x.w));
} }
GLM_FUNC_QUALIFIER uint pow(uint x, uint y) GLM_FUNC_QUALIFIER uint pow(uint x, uint y) GLM_NOEXCEPT
{ {
uint result = x; uint result = x;
for(uint i = 1; i < y; ++i) for(uint i = 1; i < y; ++i)
@ -146,7 +146,7 @@ namespace detail
return result; return result;
} }
GLM_FUNC_QUALIFIER uint sqrt(uint x) GLM_FUNC_QUALIFIER uint sqrt(uint x) GLM_NOEXCEPT
{ {
if(x <= 1) return x; if(x <= 1) return x;
@ -162,14 +162,14 @@ namespace detail
return CurrentAnswer; return CurrentAnswer;
} }
GLM_FUNC_QUALIFIER uint mod(uint x, uint y) GLM_FUNC_QUALIFIER uint mod(uint x, uint y) GLM_NOEXCEPT
{ {
return x - y * (x / y); return x - y * (x / y);
} }
#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC)) #if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC))
GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) GLM_NOEXCEPT
{ {
return 31u - findMSB(x); return 31u - findMSB(x);
} }
@ -177,7 +177,7 @@ namespace detail
#else #else
// Hackers Delight: http://www.hackersdelight.org/HDcode/nlz.c.txt // Hackers Delight: http://www.hackersdelight.org/HDcode/nlz.c.txt
GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) GLM_NOEXCEPT
{ {
int y, m, n; int y, m, n;

View File

@ -62,7 +62,7 @@ namespace glm
GLM_FUNC_DECL bool intersectRayPlane( GLM_FUNC_DECL bool intersectRayPlane(
genType const & orig, genType const & dir, genType const & orig, genType const & dir,
genType const & planeOrig, genType const & planeNormal, genType const & planeOrig, genType const & planeNormal,
typename genType::value_type & intersectionDistance); typename genType::value_type & intersectionDistance) GLM_NOEXCEPT;
//! Compute the intersection of a ray and a triangle. //! Compute the intersection of a ray and a triangle.
//! From GLM_GTX_intersect extension. //! From GLM_GTX_intersect extension.
@ -70,7 +70,7 @@ namespace glm
GLM_FUNC_DECL bool intersectRayTriangle( GLM_FUNC_DECL bool intersectRayTriangle(
genType const & orig, genType const & dir, genType const & orig, genType const & dir,
genType const & vert0, genType const & vert1, genType const & vert2, genType const & vert0, genType const & vert1, genType const & vert2,
genType & baryPosition); genType & baryPosition) GLM_NOEXCEPT;
//! Compute the intersection of a line and a triangle. //! Compute the intersection of a line and a triangle.
//! From GLM_GTX_intersect extension. //! From GLM_GTX_intersect extension.
@ -78,7 +78,7 @@ namespace glm
GLM_FUNC_DECL bool intersectLineTriangle( GLM_FUNC_DECL bool intersectLineTriangle(
genType const & orig, genType const & dir, genType const & orig, genType const & dir,
genType const & vert0, genType const & vert1, genType const & vert2, genType const & vert0, genType const & vert1, genType const & vert2,
genType & position); genType & position) GLM_NOEXCEPT;
//! Compute the intersection distance of a ray and a sphere. //! Compute the intersection distance of a ray and a sphere.
//! The ray direction vector is unit length. //! The ray direction vector is unit length.
@ -87,7 +87,7 @@ namespace glm
GLM_FUNC_DECL bool intersectRaySphere( GLM_FUNC_DECL bool intersectRaySphere(
genType const & rayStarting, genType const & rayNormalizedDirection, genType const & rayStarting, genType const & rayNormalizedDirection,
genType const & sphereCenter, typename genType::value_type const sphereRadiusSquered, genType const & sphereCenter, typename genType::value_type const sphereRadiusSquered,
typename genType::value_type & intersectionDistance); typename genType::value_type & intersectionDistance) GLM_NOEXCEPT;
//! Compute the intersection of a ray and a sphere. //! Compute the intersection of a ray and a sphere.
//! From GLM_GTX_intersect extension. //! From GLM_GTX_intersect extension.
@ -95,7 +95,7 @@ namespace glm
GLM_FUNC_DECL bool intersectRaySphere( GLM_FUNC_DECL bool intersectRaySphere(
genType const & rayStarting, genType const & rayNormalizedDirection, genType const & rayStarting, genType const & rayNormalizedDirection,
genType const & sphereCenter, const typename genType::value_type sphereRadius, genType const & sphereCenter, const typename genType::value_type sphereRadius,
genType & intersectionPosition, genType & intersectionNormal); genType & intersectionPosition, genType & intersectionNormal) GLM_NOEXCEPT;
//! Compute the intersection of a line and a sphere. //! Compute the intersection of a line and a sphere.
//! From GLM_GTX_intersect extension //! From GLM_GTX_intersect extension
@ -104,7 +104,7 @@ namespace glm
genType const & point0, genType const & point1, genType const & point0, genType const & point1,
genType const & sphereCenter, typename genType::value_type sphereRadius, genType const & sphereCenter, typename genType::value_type sphereRadius,
genType & intersectionPosition1, genType & intersectionNormal1, genType & intersectionPosition1, genType & intersectionNormal1,
genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType()); genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType()) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -19,7 +19,7 @@ namespace glm
genType const & orig, genType const & dir, genType const & orig, genType const & dir,
genType const & planeOrig, genType const & planeNormal, genType const & planeOrig, genType const & planeNormal,
typename genType::value_type & intersectionDistance typename genType::value_type & intersectionDistance
) ) GLM_NOEXCEPT
{ {
typename genType::value_type d = glm::dot(dir, planeNormal); typename genType::value_type d = glm::dot(dir, planeNormal);
typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon(); typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
@ -39,7 +39,7 @@ namespace glm
genType const & orig, genType const & dir, genType const & orig, genType const & dir,
genType const & v0, genType const & v1, genType const & v2, genType const & v0, genType const & v1, genType const & v2,
genType & baryPosition genType & baryPosition
) ) GLM_NOEXCEPT
{ {
genType e1 = v1 - v0; genType e1 = v1 - v0;
genType e2 = v2 - v0; genType e2 = v2 - v0;
@ -79,7 +79,7 @@ namespace glm
// genType const & orig, genType const & dir, // genType const & orig, genType const & dir,
// genType const & vert0, genType const & vert1, genType const & vert2, // genType const & vert0, genType const & vert1, genType const & vert2,
// genType & position // genType & position
//) //) GLM_NOEXCEPT
//{ //{
// typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon(); // typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
// //
@ -116,7 +116,7 @@ namespace glm
genType const & orig, genType const & dir, genType const & orig, genType const & dir,
genType const & vert0, genType const & vert1, genType const & vert2, genType const & vert0, genType const & vert1, genType const & vert2,
genType & position genType & position
) ) GLM_NOEXCEPT
{ {
typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon(); typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
@ -154,7 +154,7 @@ namespace glm
genType const & rayStarting, genType const & rayNormalizedDirection, genType const & rayStarting, genType const & rayNormalizedDirection,
genType const & sphereCenter, const typename genType::value_type sphereRadiusSquered, genType const & sphereCenter, const typename genType::value_type sphereRadiusSquered,
typename genType::value_type & intersectionDistance typename genType::value_type & intersectionDistance
) ) GLM_NOEXCEPT
{ {
typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon(); typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
genType diff = sphereCenter - rayStarting; genType diff = sphereCenter - rayStarting;
@ -175,7 +175,7 @@ namespace glm
genType const & rayStarting, genType const & rayNormalizedDirection, genType const & rayStarting, genType const & rayNormalizedDirection,
genType const & sphereCenter, const typename genType::value_type sphereRadius, genType const & sphereCenter, const typename genType::value_type sphereRadius,
genType & intersectionPosition, genType & intersectionNormal genType & intersectionPosition, genType & intersectionNormal
) ) GLM_NOEXCEPT
{ {
typename genType::value_type distance; typename genType::value_type distance;
if( intersectRaySphere( rayStarting, rayNormalizedDirection, sphereCenter, sphereRadius * sphereRadius, distance ) ) if( intersectRaySphere( rayStarting, rayNormalizedDirection, sphereCenter, sphereRadius * sphereRadius, distance ) )
@ -194,7 +194,7 @@ namespace glm
genType const & sphereCenter, typename genType::value_type sphereRadius, genType const & sphereCenter, typename genType::value_type sphereRadius,
genType & intersectionPoint1, genType & intersectionNormal1, genType & intersectionPoint1, genType & intersectionNormal1,
genType & intersectionPoint2, genType & intersectionNormal2 genType & intersectionPoint2, genType & intersectionNormal2
) ) GLM_NOEXCEPT
{ {
typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon(); typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
genType dir = normalize(point1 - point0); genType dir = normalize(point1 - point0);

View File

@ -58,14 +58,14 @@ namespace glm
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType log( GLM_FUNC_DECL genType log(
genType x, genType x,
genType base); genType base) GLM_NOEXCEPT;
//! Logarithm for any base. //! Logarithm for any base.
//! From GLM_GTX_log_base. //! From GLM_GTX_log_base.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> sign( GLM_FUNC_DECL vecType<T, P> sign(
vecType<T, P> const & x, vecType<T, P> const & x,
vecType<T, P> const & base); vecType<T, P> const & base) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -33,14 +33,14 @@
namespace glm namespace glm
{ {
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType log(genType const & x, genType const & base) GLM_FUNC_QUALIFIER genType log(genType const & x, genType const & base) GLM_NOEXCEPT
{ {
assert(x != genType(0)); assert(x != genType(0));
return glm::log(x) / glm::log(base); return glm::log(x) / glm::log(base);
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> log(vecType<T, P> const & x, vecType<T, P> const & base) GLM_FUNC_QUALIFIER vecType<T, P> log(vecType<T, P> const & x, vecType<T, P> const & base) GLM_NOEXCEPT
{ {
return glm::log(x) / glm::log(base); return glm::log(x) / glm::log(base);
} }

View File

@ -58,13 +58,13 @@ namespace glm
//! From GLM_GTX_matrix_cross_product extension. //! From GLM_GTX_matrix_cross_product extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> matrixCross3( GLM_FUNC_DECL tmat3x3<T, P> matrixCross3(
tvec3<T, P> const & x); tvec3<T, P> const & x) GLM_NOEXCEPT;
//! Build a cross product matrix. //! Build a cross product matrix.
//! From GLM_GTX_matrix_cross_product extension. //! From GLM_GTX_matrix_cross_product extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> matrixCross4( GLM_FUNC_DECL tmat4x4<T, P> matrixCross4(
tvec3<T, P> const & x); tvec3<T, P> const & x) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -36,7 +36,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat3x3<T, P> matrixCross3 GLM_FUNC_QUALIFIER tmat3x3<T, P> matrixCross3
( (
tvec3<T, P> const & x tvec3<T, P> const & x
) ) GLM_NOEXCEPT
{ {
tmat3x3<T, P> Result(T(0)); tmat3x3<T, P> Result(T(0));
Result[0][1] = x.z; Result[0][1] = x.z;
@ -52,7 +52,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x4<T, P> matrixCross4 GLM_FUNC_QUALIFIER tmat4x4<T, P> matrixCross4
( (
tvec3<T, P> const & x tvec3<T, P> const & x
) ) GLM_NOEXCEPT
{ {
tmat4x4<T, P> Result(T(0)); tmat4x4<T, P> Result(T(0));
Result[0][1] = x.z; Result[0][1] = x.z;

View File

@ -62,7 +62,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL bool decompose( GLM_FUNC_DECL bool decompose(
tmat4x4<T, P> const & modelMatrix, tmat4x4<T, P> const & modelMatrix,
tvec3<T, P> & scale, tquat<T, P> & orientation, tvec3<T, P> & translation, tvec3<T, P> & skew, tvec4<T, P> & perspective); tvec3<T, P> & scale, tquat<T, P> & orientation, tvec3<T, P> & translation, tvec3<T, P> & skew, tvec4<T, P> & perspective) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -38,13 +38,13 @@ namespace glm
GLM_FUNC_QUALIFIER tvec3<T, P> combine( GLM_FUNC_QUALIFIER tvec3<T, P> combine(
tvec3<T, P> const & a, tvec3<T, P> const & a,
tvec3<T, P> const & b, tvec3<T, P> const & b,
T ascl, T bscl) T ascl, T bscl) GLM_NOEXCEPT
{ {
return (a * ascl) + (b * bscl); return (a * ascl) + (b * bscl);
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER void v3Scale(tvec3<T, P> & v, T desiredLength) GLM_FUNC_QUALIFIER void v3Scale(tvec3<T, P> & v, T desiredLength) GLM_NOEXCEPT
{ {
T len = glm::length(v); T len = glm::length(v);
if(len != 0) if(len != 0)
@ -64,7 +64,7 @@ namespace glm
*/ */
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER bool decompose(tmat4x4<T, P> const & ModelMatrix, tvec3<T, P> & Scale, tquat<T, P> & Orientation, tvec3<T, P> & Translation, tvec3<T, P> & Skew, tvec4<T, P> & Perspective) GLM_FUNC_QUALIFIER bool decompose(tmat4x4<T, P> const & ModelMatrix, tvec3<T, P> & Scale, tquat<T, P> & Orientation, tvec3<T, P> & Translation, tvec3<T, P> & Skew, tvec4<T, P> & Perspective) GLM_NOEXCEPT
{ {
tmat4x4<T, P> LocalMatrix(ModelMatrix); tmat4x4<T, P> LocalMatrix(ModelMatrix);

View File

@ -59,20 +59,20 @@ namespace glm
GLM_FUNC_DECL void axisAngle( GLM_FUNC_DECL void axisAngle(
tmat4x4<T, P> const & mat, tmat4x4<T, P> const & mat,
tvec3<T, P> & axis, tvec3<T, P> & axis,
T & angle); T & angle) GLM_NOEXCEPT;
/// Build a matrix from axis and angle. /// Build a matrix from axis and angle.
/// From GLM_GTX_matrix_interpolation extension. /// From GLM_GTX_matrix_interpolation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> axisAngleMatrix( GLM_FUNC_DECL tmat4x4<T, P> axisAngleMatrix(
tvec3<T, P> const & axis, tvec3<T, P> const & axis,
T const angle); T const angle) GLM_NOEXCEPT;
/// Extracts the rotation part of a matrix. /// Extracts the rotation part of a matrix.
/// From GLM_GTX_matrix_interpolation extension. /// From GLM_GTX_matrix_interpolation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> extractMatrixRotation( GLM_FUNC_DECL tmat4x4<T, P> extractMatrixRotation(
tmat4x4<T, P> const & mat); tmat4x4<T, P> const & mat) GLM_NOEXCEPT;
/// Build a interpolation of 4 * 4 matrixes. /// Build a interpolation of 4 * 4 matrixes.
/// From GLM_GTX_matrix_interpolation extension. /// From GLM_GTX_matrix_interpolation extension.
@ -81,7 +81,7 @@ namespace glm
GLM_FUNC_DECL tmat4x4<T, P> interpolate( GLM_FUNC_DECL tmat4x4<T, P> interpolate(
tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m1,
tmat4x4<T, P> const & m2, tmat4x4<T, P> const & m2,
T const delta); T const delta) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -38,7 +38,7 @@ namespace glm
tmat4x4<T, P> const & mat, tmat4x4<T, P> const & mat,
tvec3<T, P> & axis, tvec3<T, P> & axis,
T & angle T & angle
) ) GLM_NOEXCEPT
{ {
T epsilon = (T)0.01; T epsilon = (T)0.01;
T epsilon2 = (T)0.1; T epsilon2 = (T)0.1;
@ -112,7 +112,7 @@ namespace glm
( (
tvec3<T, P> const & axis, tvec3<T, P> const & axis,
T const angle T const angle
) ) GLM_NOEXCEPT
{ {
T c = cos(angle); T c = cos(angle);
T s = sin(angle); T s = sin(angle);
@ -131,7 +131,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x4<T, P> extractMatrixRotation GLM_FUNC_QUALIFIER tmat4x4<T, P> extractMatrixRotation
( (
tmat4x4<T, P> const & mat tmat4x4<T, P> const & mat
) ) GLM_NOEXCEPT
{ {
return tmat4x4<T, P>( return tmat4x4<T, P>(
mat[0][0], mat[0][1], mat[0][2], 0.0, mat[0][0], mat[0][1], mat[0][2], 0.0,
@ -147,7 +147,7 @@ namespace glm
tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m1,
tmat4x4<T, P> const & m2, tmat4x4<T, P> const & m2,
T const delta T const delta
) ) GLM_NOEXCEPT
{ {
tmat4x4<T, P> m1rot = extractMatrixRotation(m1); tmat4x4<T, P> m1rot = extractMatrixRotation(m1);
tmat4x4<T, P> dltRotation = m2 * transpose(m1rot); tmat4x4<T, P> dltRotation = m2 * transpose(m1rot);

View File

@ -59,13 +59,13 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> rowMajor2( GLM_FUNC_DECL tmat2x2<T, P> rowMajor2(
tvec2<T, P> const & v1, tvec2<T, P> const & v1,
tvec2<T, P> const & v2); tvec2<T, P> const & v2) GLM_NOEXCEPT;
//! Build a row major matrix from other matrix. //! Build a row major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> rowMajor2( GLM_FUNC_DECL tmat2x2<T, P> rowMajor2(
tmat2x2<T, P> const & m); tmat2x2<T, P> const & m) GLM_NOEXCEPT;
//! Build a row major matrix from row vectors. //! Build a row major matrix from row vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
@ -73,13 +73,13 @@ namespace glm
GLM_FUNC_DECL tmat3x3<T, P> rowMajor3( GLM_FUNC_DECL tmat3x3<T, P> rowMajor3(
tvec3<T, P> const & v1, tvec3<T, P> const & v1,
tvec3<T, P> const & v2, tvec3<T, P> const & v2,
tvec3<T, P> const & v3); tvec3<T, P> const & v3) GLM_NOEXCEPT;
//! Build a row major matrix from other matrix. //! Build a row major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> rowMajor3( GLM_FUNC_DECL tmat3x3<T, P> rowMajor3(
tmat3x3<T, P> const & m); tmat3x3<T, P> const & m) GLM_NOEXCEPT;
//! Build a row major matrix from row vectors. //! Build a row major matrix from row vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
@ -88,26 +88,26 @@ namespace glm
tvec4<T, P> const & v1, tvec4<T, P> const & v1,
tvec4<T, P> const & v2, tvec4<T, P> const & v2,
tvec4<T, P> const & v3, tvec4<T, P> const & v3,
tvec4<T, P> const & v4); tvec4<T, P> const & v4) GLM_NOEXCEPT;
//! Build a row major matrix from other matrix. //! Build a row major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> rowMajor4( GLM_FUNC_DECL tmat4x4<T, P> rowMajor4(
tmat4x4<T, P> const & m); tmat4x4<T, P> const & m) GLM_NOEXCEPT;
//! Build a column major matrix from column vectors. //! Build a column major matrix from column vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> colMajor2( GLM_FUNC_DECL tmat2x2<T, P> colMajor2(
tvec2<T, P> const & v1, tvec2<T, P> const & v1,
tvec2<T, P> const & v2); tvec2<T, P> const & v2) GLM_NOEXCEPT;
//! Build a column major matrix from other matrix. //! Build a column major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> colMajor2( GLM_FUNC_DECL tmat2x2<T, P> colMajor2(
tmat2x2<T, P> const & m); tmat2x2<T, P> const & m) GLM_NOEXCEPT;
//! Build a column major matrix from column vectors. //! Build a column major matrix from column vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
@ -115,13 +115,13 @@ namespace glm
GLM_FUNC_DECL tmat3x3<T, P> colMajor3( GLM_FUNC_DECL tmat3x3<T, P> colMajor3(
tvec3<T, P> const & v1, tvec3<T, P> const & v1,
tvec3<T, P> const & v2, tvec3<T, P> const & v2,
tvec3<T, P> const & v3); tvec3<T, P> const & v3) GLM_NOEXCEPT;
//! Build a column major matrix from other matrix. //! Build a column major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> colMajor3( GLM_FUNC_DECL tmat3x3<T, P> colMajor3(
tmat3x3<T, P> const & m); tmat3x3<T, P> const & m) GLM_NOEXCEPT;
//! Build a column major matrix from column vectors. //! Build a column major matrix from column vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
@ -130,13 +130,13 @@ namespace glm
tvec4<T, P> const & v1, tvec4<T, P> const & v1,
tvec4<T, P> const & v2, tvec4<T, P> const & v2,
tvec4<T, P> const & v3, tvec4<T, P> const & v3,
tvec4<T, P> const & v4); tvec4<T, P> const & v4) GLM_NOEXCEPT;
//! Build a column major matrix from other matrix. //! Build a column major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> colMajor4( GLM_FUNC_DECL tmat4x4<T, P> colMajor4(
tmat4x4<T, P> const & m); tmat4x4<T, P> const & m) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -37,7 +37,7 @@ namespace glm
( (
tvec2<T, P> const & v1, tvec2<T, P> const & v1,
tvec2<T, P> const & v2 tvec2<T, P> const & v2
) ) GLM_NOEXCEPT
{ {
tmat2x2<T, P> Result; tmat2x2<T, P> Result;
Result[0][0] = v1.x; Result[0][0] = v1.x;
@ -49,7 +49,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> rowMajor2( GLM_FUNC_QUALIFIER tmat2x2<T, P> rowMajor2(
const tmat2x2<T, P>& m) const tmat2x2<T, P>& m) GLM_NOEXCEPT
{ {
tmat2x2<T, P> Result; tmat2x2<T, P> Result;
Result[0][0] = m[0][0]; Result[0][0] = m[0][0];
@ -63,7 +63,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat3x3<T, P> rowMajor3( GLM_FUNC_QUALIFIER tmat3x3<T, P> rowMajor3(
const tvec3<T, P>& v1, const tvec3<T, P>& v1,
const tvec3<T, P>& v2, const tvec3<T, P>& v2,
const tvec3<T, P>& v3) const tvec3<T, P>& v3) GLM_NOEXCEPT
{ {
tmat3x3<T, P> Result; tmat3x3<T, P> Result;
Result[0][0] = v1.x; Result[0][0] = v1.x;
@ -80,7 +80,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> rowMajor3( GLM_FUNC_QUALIFIER tmat3x3<T, P> rowMajor3(
const tmat3x3<T, P>& m) const tmat3x3<T, P>& m) GLM_NOEXCEPT
{ {
tmat3x3<T, P> Result; tmat3x3<T, P> Result;
Result[0][0] = m[0][0]; Result[0][0] = m[0][0];
@ -100,7 +100,7 @@ namespace glm
const tvec4<T, P>& v1, const tvec4<T, P>& v1,
const tvec4<T, P>& v2, const tvec4<T, P>& v2,
const tvec4<T, P>& v3, const tvec4<T, P>& v3,
const tvec4<T, P>& v4) const tvec4<T, P>& v4) GLM_NOEXCEPT
{ {
tmat4x4<T, P> Result; tmat4x4<T, P> Result;
Result[0][0] = v1.x; Result[0][0] = v1.x;
@ -124,7 +124,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> rowMajor4( GLM_FUNC_QUALIFIER tmat4x4<T, P> rowMajor4(
const tmat4x4<T, P>& m) const tmat4x4<T, P>& m) GLM_NOEXCEPT
{ {
tmat4x4<T, P> Result; tmat4x4<T, P> Result;
Result[0][0] = m[0][0]; Result[0][0] = m[0][0];
@ -149,14 +149,14 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> colMajor2( GLM_FUNC_QUALIFIER tmat2x2<T, P> colMajor2(
const tvec2<T, P>& v1, const tvec2<T, P>& v1,
const tvec2<T, P>& v2) const tvec2<T, P>& v2) GLM_NOEXCEPT
{ {
return tmat2x2<T, P>(v1, v2); return tmat2x2<T, P>(v1, v2);
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> colMajor2( GLM_FUNC_QUALIFIER tmat2x2<T, P> colMajor2(
const tmat2x2<T, P>& m) const tmat2x2<T, P>& m) GLM_NOEXCEPT
{ {
return tmat2x2<T, P>(m); return tmat2x2<T, P>(m);
} }
@ -165,14 +165,14 @@ namespace glm
GLM_FUNC_QUALIFIER tmat3x3<T, P> colMajor3( GLM_FUNC_QUALIFIER tmat3x3<T, P> colMajor3(
const tvec3<T, P>& v1, const tvec3<T, P>& v1,
const tvec3<T, P>& v2, const tvec3<T, P>& v2,
const tvec3<T, P>& v3) const tvec3<T, P>& v3) GLM_NOEXCEPT
{ {
return tmat3x3<T, P>(v1, v2, v3); return tmat3x3<T, P>(v1, v2, v3);
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> colMajor3( GLM_FUNC_QUALIFIER tmat3x3<T, P> colMajor3(
const tmat3x3<T, P>& m) const tmat3x3<T, P>& m) GLM_NOEXCEPT
{ {
return tmat3x3<T, P>(m); return tmat3x3<T, P>(m);
} }
@ -182,14 +182,14 @@ namespace glm
const tvec4<T, P>& v1, const tvec4<T, P>& v1,
const tvec4<T, P>& v2, const tvec4<T, P>& v2,
const tvec4<T, P>& v3, const tvec4<T, P>& v3,
const tvec4<T, P>& v4) const tvec4<T, P>& v4) GLM_NOEXCEPT
{ {
return tmat4x4<T, P>(v1, v2, v3, v4); return tmat4x4<T, P>(v1, v2, v3, v4);
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> colMajor4( GLM_FUNC_QUALIFIER tmat4x4<T, P> colMajor4(
const tmat4x4<T, P>& m) const tmat4x4<T, P>& m) GLM_NOEXCEPT
{ {
return tmat4x4<T, P>(m); return tmat4x4<T, P>(m);
} }

View File

@ -57,55 +57,55 @@ namespace glm
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> diagonal2x2( GLM_FUNC_DECL tmat2x2<T, P> diagonal2x2(
tvec2<T, P> const & v); tvec2<T, P> const & v) GLM_NOEXCEPT;
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> diagonal2x3( GLM_FUNC_DECL tmat2x3<T, P> diagonal2x3(
tvec2<T, P> const & v); tvec2<T, P> const & v) GLM_NOEXCEPT;
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> diagonal2x4( GLM_FUNC_DECL tmat2x4<T, P> diagonal2x4(
tvec2<T, P> const & v); tvec2<T, P> const & v) GLM_NOEXCEPT;
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> diagonal3x2( GLM_FUNC_DECL tmat3x2<T, P> diagonal3x2(
tvec2<T, P> const & v); tvec2<T, P> const & v) GLM_NOEXCEPT;
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> diagonal3x3( GLM_FUNC_DECL tmat3x3<T, P> diagonal3x3(
tvec3<T, P> const & v); tvec3<T, P> const & v) GLM_NOEXCEPT;
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> diagonal3x4( GLM_FUNC_DECL tmat3x4<T, P> diagonal3x4(
tvec3<T, P> const & v); tvec3<T, P> const & v) GLM_NOEXCEPT;
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> diagonal4x2( GLM_FUNC_DECL tmat4x2<T, P> diagonal4x2(
tvec2<T, P> const & v); tvec2<T, P> const & v) GLM_NOEXCEPT;
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> diagonal4x3( GLM_FUNC_DECL tmat4x3<T, P> diagonal4x3(
tvec3<T, P> const & v); tvec3<T, P> const & v) GLM_NOEXCEPT;
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> diagonal4x4( GLM_FUNC_DECL tmat4x4<T, P> diagonal4x4(
tvec4<T, P> const & v); tvec4<T, P> const & v) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -36,7 +36,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat2x2<T, P> diagonal2x2 GLM_FUNC_QUALIFIER tmat2x2<T, P> diagonal2x2
( (
tvec2<T, P> const & v tvec2<T, P> const & v
) ) GLM_NOEXCEPT
{ {
tmat2x2<T, P> Result(static_cast<T>(1)); tmat2x2<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
@ -48,7 +48,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat2x3<T, P> diagonal2x3 GLM_FUNC_QUALIFIER tmat2x3<T, P> diagonal2x3
( (
tvec2<T, P> const & v tvec2<T, P> const & v
) ) GLM_NOEXCEPT
{ {
tmat2x3<T, P> Result(static_cast<T>(1)); tmat2x3<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
@ -60,7 +60,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat2x4<T, P> diagonal2x4 GLM_FUNC_QUALIFIER tmat2x4<T, P> diagonal2x4
( (
tvec2<T, P> const & v tvec2<T, P> const & v
) ) GLM_NOEXCEPT
{ {
tmat2x4<T, P> Result(static_cast<T>(1)); tmat2x4<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
@ -72,7 +72,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat3x2<T, P> diagonal3x2 GLM_FUNC_QUALIFIER tmat3x2<T, P> diagonal3x2
( (
tvec2<T, P> const & v tvec2<T, P> const & v
) ) GLM_NOEXCEPT
{ {
tmat3x2<T, P> Result(static_cast<T>(1)); tmat3x2<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
@ -84,7 +84,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat3x3<T, P> diagonal3x3 GLM_FUNC_QUALIFIER tmat3x3<T, P> diagonal3x3
( (
tvec3<T, P> const & v tvec3<T, P> const & v
) ) GLM_NOEXCEPT
{ {
tmat3x3<T, P> Result(static_cast<T>(1)); tmat3x3<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
@ -97,7 +97,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat3x4<T, P> diagonal3x4 GLM_FUNC_QUALIFIER tmat3x4<T, P> diagonal3x4
( (
tvec3<T, P> const & v tvec3<T, P> const & v
) ) GLM_NOEXCEPT
{ {
tmat3x4<T, P> Result(static_cast<T>(1)); tmat3x4<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
@ -110,7 +110,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x4<T, P> diagonal4x4 GLM_FUNC_QUALIFIER tmat4x4<T, P> diagonal4x4
( (
tvec4<T, P> const & v tvec4<T, P> const & v
) ) GLM_NOEXCEPT
{ {
tmat4x4<T, P> Result(static_cast<T>(1)); tmat4x4<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
@ -124,7 +124,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x3<T, P> diagonal4x3 GLM_FUNC_QUALIFIER tmat4x3<T, P> diagonal4x3
( (
tvec3<T, P> const & v tvec3<T, P> const & v
) ) GLM_NOEXCEPT
{ {
tmat4x3<T, P> Result(static_cast<T>(1)); tmat4x3<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
@ -137,7 +137,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x2<T, P> diagonal4x2 GLM_FUNC_QUALIFIER tmat4x2<T, P> diagonal4x2
( (
tvec2<T, P> const & v tvec2<T, P> const & v
) ) GLM_NOEXCEPT
{ {
tmat4x2<T, P> Result(static_cast<T>(1)); tmat4x2<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];

View File

@ -59,42 +59,42 @@ namespace glm
/// Return whether a matrix a null matrix. /// Return whether a matrix a null matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL bool isNull(tmat2x2<T, P> const & m, T const & epsilon); GLM_FUNC_DECL bool isNull(tmat2x2<T, P> const & m, T const & epsilon) GLM_NOEXCEPT;
/// Return whether a matrix a null matrix. /// Return whether a matrix a null matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL bool isNull(tmat3x3<T, P> const & m, T const & epsilon); GLM_FUNC_DECL bool isNull(tmat3x3<T, P> const & m, T const & epsilon) GLM_NOEXCEPT;
/// Return whether a matrix is a null matrix. /// Return whether a matrix is a null matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL bool isNull(tmat4x4<T, P> const & m, T const & epsilon); GLM_FUNC_DECL bool isNull(tmat4x4<T, P> const & m, T const & epsilon) GLM_NOEXCEPT;
/// Return whether a matrix is an identity matrix. /// Return whether a matrix is an identity matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P, template <typename, precision> class matType> template<typename T, precision P, template <typename, precision> class matType>
GLM_FUNC_DECL bool isIdentity(matType<T, P> const & m, T const & epsilon); GLM_FUNC_DECL bool isIdentity(matType<T, P> const & m, T const & epsilon) GLM_NOEXCEPT;
/// Return whether a matrix is a normalized matrix. /// Return whether a matrix is a normalized matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL bool isNormalized(tmat2x2<T, P> const & m, T const & epsilon); GLM_FUNC_DECL bool isNormalized(tmat2x2<T, P> const & m, T const & epsilon) GLM_NOEXCEPT;
/// Return whether a matrix is a normalized matrix. /// Return whether a matrix is a normalized matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL bool isNormalized(tmat3x3<T, P> const & m, T const & epsilon); GLM_FUNC_DECL bool isNormalized(tmat3x3<T, P> const & m, T const & epsilon) GLM_NOEXCEPT;
/// Return whether a matrix is a normalized matrix. /// Return whether a matrix is a normalized matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL bool isNormalized(tmat4x4<T, P> const & m, T const & epsilon); GLM_FUNC_DECL bool isNormalized(tmat4x4<T, P> const & m, T const & epsilon) GLM_NOEXCEPT;
/// Return whether a matrix is an orthonormalized matrix. /// Return whether a matrix is an orthonormalized matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, precision P, template <typename, precision> class matType> template<typename T, precision P, template <typename, precision> class matType>
GLM_FUNC_DECL bool isOrthogonal(matType<T, P> const & m, T const & epsilon); GLM_FUNC_DECL bool isOrthogonal(matType<T, P> const & m, T const & epsilon) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -33,7 +33,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_QUALIFIER bool isNull(tmat2x2<T, P> const & m, T const & epsilon) GLM_FUNC_QUALIFIER bool isNull(tmat2x2<T, P> const & m, T const & epsilon) GLM_NOEXCEPT
{ {
bool result = true; bool result = true;
for(detail::component_count_t i = 0; result && i < 2 ; ++i) for(detail::component_count_t i = 0; result && i < 2 ; ++i)
@ -42,7 +42,7 @@ namespace glm
} }
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_QUALIFIER bool isNull(tmat3x3<T, P> const & m, T const & epsilon) GLM_FUNC_QUALIFIER bool isNull(tmat3x3<T, P> const & m, T const & epsilon) GLM_NOEXCEPT
{ {
bool result = true; bool result = true;
for(detail::component_count_t i = 0; result && i < 3 ; ++i) for(detail::component_count_t i = 0; result && i < 3 ; ++i)
@ -51,7 +51,7 @@ namespace glm
} }
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_QUALIFIER bool isNull(tmat4x4<T, P> const & m, T const & epsilon) GLM_FUNC_QUALIFIER bool isNull(tmat4x4<T, P> const & m, T const & epsilon) GLM_NOEXCEPT
{ {
bool result = true; bool result = true;
for(detail::component_count_t i = 0; result && i < 4 ; ++i) for(detail::component_count_t i = 0; result && i < 4 ; ++i)
@ -60,7 +60,7 @@ namespace glm
} }
template<typename T, precision P, template <typename, precision> class matType> template<typename T, precision P, template <typename, precision> class matType>
GLM_FUNC_QUALIFIER bool isIdentity(matType<T, P> const & m, T const & epsilon) GLM_FUNC_QUALIFIER bool isIdentity(matType<T, P> const & m, T const & epsilon) GLM_NOEXCEPT
{ {
bool result = true; bool result = true;
for(detail::component_count_t i(0); result && i < detail::component_count(m[0]); ++i) for(detail::component_count_t i(0); result && i < detail::component_count(m[0]); ++i)
@ -76,7 +76,7 @@ namespace glm
} }
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_QUALIFIER bool isNormalized(tmat2x2<T, P> const & m, T const & epsilon) GLM_FUNC_QUALIFIER bool isNormalized(tmat2x2<T, P> const & m, T const & epsilon) GLM_NOEXCEPT
{ {
bool result(true); bool result(true);
for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i) for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
@ -92,7 +92,7 @@ namespace glm
} }
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_QUALIFIER bool isNormalized(tmat3x3<T, P> const & m, T const & epsilon) GLM_FUNC_QUALIFIER bool isNormalized(tmat3x3<T, P> const & m, T const & epsilon) GLM_NOEXCEPT
{ {
bool result(true); bool result(true);
for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i) for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
@ -108,7 +108,7 @@ namespace glm
} }
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_QUALIFIER bool isNormalized(tmat4x4<T, P> const & m, T const & epsilon) GLM_FUNC_QUALIFIER bool isNormalized(tmat4x4<T, P> const & m, T const & epsilon) GLM_NOEXCEPT
{ {
bool result(true); bool result(true);
for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i) for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
@ -124,7 +124,7 @@ namespace glm
} }
template<typename T, precision P, template <typename, precision> class matType> template<typename T, precision P, template <typename, precision> class matType>
GLM_FUNC_QUALIFIER bool isOrthogonal(matType<T, P> const & m, T const & epsilon) GLM_FUNC_QUALIFIER bool isOrthogonal(matType<T, P> const & m, T const & epsilon) GLM_NOEXCEPT
{ {
bool result(true); bool result(true);
for(detail::component_count_t i(0); result && i < detail::component_count(m) - 1; ++i) for(detail::component_count_t i(0); result && i < detail::component_count(m) - 1; ++i)

View File

@ -62,7 +62,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> translate( GLM_FUNC_QUALIFIER tmat3x3<T, P> translate(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
tvec2<T, P> const & v); tvec2<T, P> const & v) GLM_NOEXCEPT;
/// Builds a rotation 3 * 3 matrix created from an angle. /// Builds a rotation 3 * 3 matrix created from an angle.
/// ///
@ -71,7 +71,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> rotate( GLM_FUNC_QUALIFIER tmat3x3<T, P> rotate(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T angle); T angle) GLM_NOEXCEPT;
/// Builds a scale 3 * 3 matrix created from a vector of 2 components. /// Builds a scale 3 * 3 matrix created from a vector of 2 components.
/// ///
@ -80,7 +80,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> scale( GLM_FUNC_QUALIFIER tmat3x3<T, P> scale(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
tvec2<T, P> const & v); tvec2<T, P> const & v) GLM_NOEXCEPT;
/// Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix. /// Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix.
/// ///
@ -89,7 +89,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX( GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T y); T y) GLM_NOEXCEPT;
/// Builds a vertical (parallel to the y axis) shear 3 * 3 matrix. /// Builds a vertical (parallel to the y axis) shear 3 * 3 matrix.
/// ///
@ -98,7 +98,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY( GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T x); T x) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -38,7 +38,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> translate( GLM_FUNC_QUALIFIER tmat3x3<T, P> translate(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
tvec2<T, P> const & v) tvec2<T, P> const & v) GLM_NOEXCEPT
{ {
tmat3x3<T, P> Result(m); tmat3x3<T, P> Result(m);
Result[2] = m[0] * v[0] + m[1] * v[1] + m[2]; Result[2] = m[0] * v[0] + m[1] * v[1] + m[2];
@ -49,7 +49,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> rotate( GLM_FUNC_QUALIFIER tmat3x3<T, P> rotate(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T angle) T angle) GLM_NOEXCEPT
{ {
T const a = angle; T const a = angle;
T const c = cos(a); T const c = cos(a);
@ -65,7 +65,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> scale( GLM_FUNC_QUALIFIER tmat3x3<T, P> scale(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
tvec2<T, P> const & v) tvec2<T, P> const & v) GLM_NOEXCEPT
{ {
tmat3x3<T, P> Result(uninitialize); tmat3x3<T, P> Result(uninitialize);
Result[0] = m[0] * v[0]; Result[0] = m[0] * v[0];
@ -77,7 +77,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX( GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T y) T y) GLM_NOEXCEPT
{ {
tmat3x3<T, P> Result(1); tmat3x3<T, P> Result(1);
Result[0][1] = y; Result[0][1] = y;
@ -87,7 +87,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY( GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T x) T x) GLM_NOEXCEPT
{ {
tmat3x3<T, P> Result(1); tmat3x3<T, P> Result(1);
Result[1][0] = x; Result[1][0] = x;

View File

@ -58,7 +58,7 @@ namespace glm
GLM_FUNC_DECL T mixedProduct( GLM_FUNC_DECL T mixedProduct(
tvec3<T, P> const & v1, tvec3<T, P> const & v1,
tvec3<T, P> const & v2, tvec3<T, P> const & v2,
tvec3<T, P> const & v3); tvec3<T, P> const & v3) GLM_NOEXCEPT;
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -38,7 +38,7 @@ namespace glm
tvec3<T, P> const & v1, tvec3<T, P> const & v1,
tvec3<T, P> const & v2, tvec3<T, P> const & v2,
tvec3<T, P> const & v3 tvec3<T, P> const & v3
) ) GLM_NOEXCEPT
{ {
return dot(cross(v1, v2), v3); return dot(cross(v1, v2), v3);
} }

View File

@ -59,53 +59,53 @@ namespace glm
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T length2( GLM_FUNC_DECL T length2(
T const & x); T const & x) GLM_NOEXCEPT;
//! Returns the squared length of x. //! Returns the squared length of x.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type length2( GLM_FUNC_DECL typename genType::value_type length2(
genType const & x); genType const & x) GLM_NOEXCEPT;
//! Returns the squared distance between p0 and p1, i.e., length2(p0 - p1). //! Returns the squared distance between p0 and p1, i.e., length2(p0 - p1).
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T> template <typename T>
GLM_FUNC_DECL T distance2( GLM_FUNC_DECL T distance2(
T const & p0, T const & p0,
T const & p1); T const & p1) GLM_NOEXCEPT;
//! Returns the squared distance between p0 and p1, i.e., length2(p0 - p1). //! Returns the squared distance between p0 and p1, i.e., length2(p0 - p1).
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL typename genType::value_type distance2( GLM_FUNC_DECL typename genType::value_type distance2(
genType const & p0, genType const & p0,
genType const & p1); genType const & p1) GLM_NOEXCEPT;
//! Returns the L1 norm between x and y. //! Returns the L1 norm between x and y.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T l1Norm( GLM_FUNC_DECL T l1Norm(
tvec3<T, P> const & x, tvec3<T, P> const & x,
tvec3<T, P> const & y); tvec3<T, P> const & y) GLM_NOEXCEPT;
//! Returns the L1 norm of v. //! Returns the L1 norm of v.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T l1Norm( GLM_FUNC_DECL T l1Norm(
tvec3<T, P> const & v); tvec3<T, P> const & v) GLM_NOEXCEPT;
//! Returns the L2 norm between x and y. //! Returns the L2 norm between x and y.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T l2Norm( GLM_FUNC_DECL T l2Norm(
tvec3<T, P> const & x, tvec3<T, P> const & x,
tvec3<T, P> const & y); tvec3<T, P> const & y) GLM_NOEXCEPT;
//! Returns the L2 norm of v. //! Returns the L2 norm of v.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T l2Norm( GLM_FUNC_DECL T l2Norm(
tvec3<T, P> const & x); tvec3<T, P> const & x) GLM_NOEXCEPT;
//! Returns the L norm between x and y. //! Returns the L norm between x and y.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
@ -113,14 +113,14 @@ namespace glm
GLM_FUNC_DECL T lxNorm( GLM_FUNC_DECL T lxNorm(
tvec3<T, P> const & x, tvec3<T, P> const & x,
tvec3<T, P> const & y, tvec3<T, P> const & y,
unsigned int Depth); unsigned int Depth) GLM_NOEXCEPT;
//! Returns the L norm of v. //! Returns the L norm of v.
//! From GLM_GTX_norm extension. //! From GLM_GTX_norm extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T lxNorm( GLM_FUNC_DECL T lxNorm(
tvec3<T, P> const & x, tvec3<T, P> const & x,
unsigned int Depth); unsigned int Depth) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -36,7 +36,7 @@ namespace glm
GLM_FUNC_QUALIFIER T length2 GLM_FUNC_QUALIFIER T length2
( (
T const & x T const & x
) ) GLM_NOEXCEPT
{ {
return x * x; return x * x;
} }
@ -45,7 +45,7 @@ namespace glm
GLM_FUNC_QUALIFIER T length2 GLM_FUNC_QUALIFIER T length2
( (
tvec2<T, P> const & x tvec2<T, P> const & x
) ) GLM_NOEXCEPT
{ {
return dot(x, x); return dot(x, x);
} }
@ -54,7 +54,7 @@ namespace glm
GLM_FUNC_QUALIFIER T length2 GLM_FUNC_QUALIFIER T length2
( (
tvec3<T, P> const & x tvec3<T, P> const & x
) ) GLM_NOEXCEPT
{ {
return dot(x, x); return dot(x, x);
} }
@ -63,7 +63,7 @@ namespace glm
GLM_FUNC_QUALIFIER T length2 GLM_FUNC_QUALIFIER T length2
( (
tvec4<T, P> const & x tvec4<T, P> const & x
) ) GLM_NOEXCEPT
{ {
return dot(x, x); return dot(x, x);
} }
@ -73,7 +73,7 @@ namespace glm
( (
T const & p0, T const & p0,
T const & p1 T const & p1
) ) GLM_NOEXCEPT
{ {
return length2(p1 - p0); return length2(p1 - p0);
} }
@ -83,7 +83,7 @@ namespace glm
( (
tvec2<T, P> const & p0, tvec2<T, P> const & p0,
tvec2<T, P> const & p1 tvec2<T, P> const & p1
) ) GLM_NOEXCEPT
{ {
return length2(p1 - p0); return length2(p1 - p0);
} }
@ -93,7 +93,7 @@ namespace glm
( (
tvec3<T, P> const & p0, tvec3<T, P> const & p0,
tvec3<T, P> const & p1 tvec3<T, P> const & p1
) ) GLM_NOEXCEPT
{ {
return length2(p1 - p0); return length2(p1 - p0);
} }
@ -103,7 +103,7 @@ namespace glm
( (
tvec4<T, P> const & p0, tvec4<T, P> const & p0,
tvec4<T, P> const & p1 tvec4<T, P> const & p1
) ) GLM_NOEXCEPT
{ {
return length2(p1 - p0); return length2(p1 - p0);
} }
@ -113,7 +113,7 @@ namespace glm
( (
tvec3<T, P> const & a, tvec3<T, P> const & a,
tvec3<T, P> const & b tvec3<T, P> const & b
) ) GLM_NOEXCEPT
{ {
return abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z); return abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z);
} }
@ -122,7 +122,7 @@ namespace glm
GLM_FUNC_QUALIFIER T l1Norm GLM_FUNC_QUALIFIER T l1Norm
( (
tvec3<T, P> const & v tvec3<T, P> const & v
) ) GLM_NOEXCEPT
{ {
return abs(v.x) + abs(v.y) + abs(v.z); return abs(v.x) + abs(v.y) + abs(v.z);
} }
@ -132,7 +132,7 @@ namespace glm
( (
tvec3<T, P> const & a, tvec3<T, P> const & a,
tvec3<T, P> const & b tvec3<T, P> const & b
) ) GLM_NOEXCEPT
{ {
return length(b - a); return length(b - a);
} }
@ -141,7 +141,7 @@ namespace glm
GLM_FUNC_QUALIFIER T l2Norm GLM_FUNC_QUALIFIER T l2Norm
( (
tvec3<T, P> const & v tvec3<T, P> const & v
) ) GLM_NOEXCEPT
{ {
return length(v); return length(v);
} }
@ -152,7 +152,7 @@ namespace glm
tvec3<T, P> const & x, tvec3<T, P> const & x,
tvec3<T, P> const & y, tvec3<T, P> const & y,
unsigned int Depth unsigned int Depth
) ) GLM_NOEXCEPT
{ {
return pow(pow(y.x - x.x, T(Depth)) + pow(y.y - x.y, T(Depth)) + pow(y.z - x.z, T(Depth)), T(1) / T(Depth)); return pow(pow(y.x - x.x, T(Depth)) + pow(y.y - x.y, T(Depth)) + pow(y.z - x.z, T(Depth)), T(1) / T(Depth));
} }
@ -162,7 +162,7 @@ namespace glm
( (
tvec3<T, P> const & v, tvec3<T, P> const & v,
unsigned int Depth unsigned int Depth
) ) GLM_NOEXCEPT
{ {
return pow(pow(v.x, T(Depth)) + pow(v.y, T(Depth)) + pow(v.z, T(Depth)), T(1) / T(Depth)); return pow(pow(v.x, T(Depth)) + pow(v.y, T(Depth)) + pow(v.z, T(Depth)), T(1) / T(Depth));
} }

View File

@ -60,7 +60,7 @@ namespace glm
GLM_FUNC_DECL tvec3<T, P> triangleNormal( GLM_FUNC_DECL tvec3<T, P> triangleNormal(
tvec3<T, P> const & p1, tvec3<T, P> const & p1,
tvec3<T, P> const & p2, tvec3<T, P> const & p2,
tvec3<T, P> const & p3); tvec3<T, P> const & p3) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -38,7 +38,7 @@ namespace glm
tvec3<T, P> const & p1, tvec3<T, P> const & p1,
tvec3<T, P> const & p2, tvec3<T, P> const & p2,
tvec3<T, P> const & p3 tvec3<T, P> const & p3
) ) GLM_NOEXCEPT
{ {
return normalize(cross(p1 - p2, p1 - p3)); return normalize(cross(p1 - p2, p1 - p3));
} }

View File

@ -59,14 +59,14 @@ namespace glm
/// ///
/// @see gtx_normalize_dot extension. /// @see gtx_normalize_dot extension.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL T normalizeDot(vecType<T, P> const & x, vecType<T, P> const & y); GLM_FUNC_DECL T normalizeDot(vecType<T, P> const & x, vecType<T, P> const & y) GLM_NOEXCEPT;
/// Normalize parameters and returns the dot product of x and y. /// Normalize parameters and returns the dot product of x and y.
/// Faster that dot(fastNormalize(x), fastNormalize(y)). /// Faster that dot(fastNormalize(x), fastNormalize(y)).
/// ///
/// @see gtx_normalize_dot extension. /// @see gtx_normalize_dot extension.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL T fastNormalizeDot(vecType<T, P> const & x, vecType<T, P> const & y); GLM_FUNC_DECL T fastNormalizeDot(vecType<T, P> const & x, vecType<T, P> const & y) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -33,13 +33,13 @@
namespace glm namespace glm
{ {
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T normalizeDot(vecType<T, P> const & x, vecType<T, P> const & y) GLM_FUNC_QUALIFIER T normalizeDot(vecType<T, P> const & x, vecType<T, P> const & y) GLM_NOEXCEPT
{ {
return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y));
} }
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T fastNormalizeDot(vecType<T, P> const & x, vecType<T, P> const & y) GLM_FUNC_QUALIFIER T fastNormalizeDot(vecType<T, P> const & x, vecType<T, P> const & y) GLM_NOEXCEPT
{ {
return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y));
} }

View File

@ -58,19 +58,19 @@ namespace gtx
/// ///
/// @see gtx_optimum_pow /// @see gtx_optimum_pow
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType pow2(genType const & x); GLM_FUNC_DECL genType pow2(genType const & x) GLM_NOEXCEPT;
/// Returns x raised to the power of 3. /// Returns x raised to the power of 3.
/// ///
/// @see gtx_optimum_pow /// @see gtx_optimum_pow
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType pow3(genType const & x); GLM_FUNC_DECL genType pow3(genType const & x) GLM_NOEXCEPT;
/// Returns x raised to the power of 4. /// Returns x raised to the power of 4.
/// ///
/// @see gtx_optimum_pow /// @see gtx_optimum_pow
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType pow4(genType const & x); GLM_FUNC_DECL genType pow4(genType const & x) GLM_NOEXCEPT;
/// @} /// @}
}//namespace gtx }//namespace gtx

View File

@ -33,19 +33,19 @@
namespace glm namespace glm
{ {
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType pow2(genType const & x) GLM_FUNC_QUALIFIER genType pow2(genType const & x) GLM_NOEXCEPT
{ {
return x * x; return x * x;
} }
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType pow3(genType const & x) GLM_FUNC_QUALIFIER genType pow3(genType const & x) GLM_NOEXCEPT
{ {
return x * x * x; return x * x * x;
} }
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType pow4(genType const & x) GLM_FUNC_QUALIFIER genType pow4(genType const & x) GLM_NOEXCEPT
{ {
return (x * x) * (x * x); return (x * x) * (x * x);
} }

View File

@ -60,13 +60,13 @@ namespace glm
/// ///
/// @see gtx_orthonormalize /// @see gtx_orthonormalize
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> orthonormalize(tmat3x3<T, P> const & m); GLM_FUNC_DECL tmat3x3<T, P> orthonormalize(tmat3x3<T, P> const & m) GLM_NOEXCEPT;
/// Orthonormalizes x according y. /// Orthonormalizes x according y.
/// ///
/// @see gtx_orthonormalize /// @see gtx_orthonormalize
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> orthonormalize(tvec3<T, P> const & x, tvec3<T, P> const & y); GLM_FUNC_DECL tvec3<T, P> orthonormalize(tvec3<T, P> const & x, tvec3<T, P> const & y) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -33,7 +33,7 @@
namespace glm namespace glm
{ {
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> orthonormalize(tmat3x3<T, P> const & m) GLM_FUNC_QUALIFIER tmat3x3<T, P> orthonormalize(tmat3x3<T, P> const & m) GLM_NOEXCEPT
{ {
tmat3x3<T, P> r = m; tmat3x3<T, P> r = m;
@ -52,7 +52,7 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> orthonormalize(tvec3<T, P> const & x, tvec3<T, P> const & y) GLM_FUNC_QUALIFIER tvec3<T, P> orthonormalize(tvec3<T, P> const & x, tvec3<T, P> const & y) GLM_NOEXCEPT
{ {
return normalize(x - y * dot(y, x)); return normalize(x - y * dot(y, x));
} }

View File

@ -60,7 +60,7 @@ namespace glm
template <typename vecType> template <typename vecType>
GLM_FUNC_DECL vecType perp( GLM_FUNC_DECL vecType perp(
vecType const & x, vecType const & x,
vecType const & Normal); vecType const & Normal) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -37,7 +37,7 @@ namespace glm
( (
vecType const & x, vecType const & x,
vecType const & Normal vecType const & Normal
) ) GLM_NOEXCEPT
{ {
return x - proj(x, Normal); return x - proj(x, Normal);
} }

View File

@ -58,14 +58,14 @@ namespace glm
/// @see gtx_polar_coordinates /// @see gtx_polar_coordinates
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> polar( GLM_FUNC_DECL tvec3<T, P> polar(
tvec3<T, P> const & euclidean); tvec3<T, P> const & euclidean) GLM_NOEXCEPT;
/// Convert Polar to Euclidean coordinates. /// Convert Polar to Euclidean coordinates.
/// ///
/// @see gtx_polar_coordinates /// @see gtx_polar_coordinates
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> euclidean( GLM_FUNC_DECL tvec3<T, P> euclidean(
tvec2<T, P> const & polar); tvec2<T, P> const & polar) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -36,7 +36,7 @@ namespace glm
GLM_FUNC_QUALIFIER tvec3<T, P> polar GLM_FUNC_QUALIFIER tvec3<T, P> polar
( (
tvec3<T, P> const & euclidean tvec3<T, P> const & euclidean
) ) GLM_NOEXCEPT
{ {
T const Length(length(euclidean)); T const Length(length(euclidean));
tvec3<T, P> const tmp(euclidean / Length); tvec3<T, P> const tmp(euclidean / Length);
@ -52,7 +52,7 @@ namespace glm
GLM_FUNC_QUALIFIER tvec3<T, P> euclidean GLM_FUNC_QUALIFIER tvec3<T, P> euclidean
( (
tvec2<T, P> const & polar tvec2<T, P> const & polar
) ) GLM_NOEXCEPT
{ {
T const latitude(polar.x); T const latitude(polar.x);
T const longitude(polar.y); T const longitude(polar.y);

View File

@ -57,7 +57,7 @@ namespace glm
/// ///
/// @see gtx_projection /// @see gtx_projection
template <typename vecType> template <typename vecType>
GLM_FUNC_DECL vecType proj(vecType const & x, vecType const & Normal); GLM_FUNC_DECL vecType proj(vecType const & x, vecType const & Normal) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -33,7 +33,7 @@
namespace glm namespace glm
{ {
template <typename vecType> template <typename vecType>
GLM_FUNC_QUALIFIER vecType proj(vecType const & x, vecType const & Normal) GLM_FUNC_QUALIFIER vecType proj(vecType const & x, vecType const & Normal) GLM_NOEXCEPT
{ {
return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal;
} }

View File

@ -63,7 +63,7 @@ namespace glm
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> cross( GLM_FUNC_DECL tvec3<T, P> cross(
tquat<T, P> const & q, tquat<T, P> const & q,
tvec3<T, P> const & v); tvec3<T, P> const & v) GLM_NOEXCEPT;
//! Compute a cross product between a vector and a quaternion. //! Compute a cross product between a vector and a quaternion.
/// ///
@ -71,7 +71,7 @@ namespace glm
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> cross( GLM_FUNC_DECL tvec3<T, P> cross(
tvec3<T, P> const & v, tvec3<T, P> const & v,
tquat<T, P> const & q); tquat<T, P> const & q) GLM_NOEXCEPT;
//! Compute a point on a path according squad equation. //! Compute a point on a path according squad equation.
//! q1 and q2 are control points; s1 and s2 are intermediate control points. //! q1 and q2 are control points; s1 and s2 are intermediate control points.
@ -83,7 +83,7 @@ namespace glm
tquat<T, P> const & q2, tquat<T, P> const & q2,
tquat<T, P> const & s1, tquat<T, P> const & s1,
tquat<T, P> const & s2, tquat<T, P> const & s2,
T const & h); T const & h) GLM_NOEXCEPT;
//! Returns an intermediate control point for squad interpolation. //! Returns an intermediate control point for squad interpolation.
/// ///
@ -92,21 +92,21 @@ namespace glm
GLM_FUNC_DECL tquat<T, P> intermediate( GLM_FUNC_DECL tquat<T, P> intermediate(
tquat<T, P> const & prev, tquat<T, P> const & prev,
tquat<T, P> const & curr, tquat<T, P> const & curr,
tquat<T, P> const & next); tquat<T, P> const & next) GLM_NOEXCEPT;
//! Returns a exp of a quaternion. //! Returns a exp of a quaternion.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tquat<T, P> exp( GLM_FUNC_DECL tquat<T, P> exp(
tquat<T, P> const & q); tquat<T, P> const & q) GLM_NOEXCEPT;
//! Returns a log of a quaternion. //! Returns a log of a quaternion.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tquat<T, P> log( GLM_FUNC_DECL tquat<T, P> log(
tquat<T, P> const & q); tquat<T, P> const & q) GLM_NOEXCEPT;
/// Returns x raised to the y power. /// Returns x raised to the y power.
/// ///
@ -114,14 +114,14 @@ namespace glm
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tquat<T, P> pow( GLM_FUNC_DECL tquat<T, P> pow(
tquat<T, P> const & x, tquat<T, P> const & x,
T const & y); T const & y) GLM_NOEXCEPT;
//! Returns quarternion square root. //! Returns quarternion square root.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
//template<typename T, precision P> //template<typename T, precision P>
//tquat<T, P> sqrt( //tquat<T, P> sqrt(
// tquat<T, P> const & q); // tquat<T, P> const & q) GLM_NOEXCEPT;
//! Rotates a 3 components vector by a quaternion. //! Rotates a 3 components vector by a quaternion.
/// ///
@ -129,7 +129,7 @@ namespace glm
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> rotate( GLM_FUNC_DECL tvec3<T, P> rotate(
tquat<T, P> const & q, tquat<T, P> const & q,
tvec3<T, P> const & v); tvec3<T, P> const & v) GLM_NOEXCEPT;
/// Rotates a 4 components vector by a quaternion. /// Rotates a 4 components vector by a quaternion.
/// ///
@ -137,42 +137,42 @@ namespace glm
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> rotate( GLM_FUNC_DECL tvec4<T, P> rotate(
tquat<T, P> const & q, tquat<T, P> const & q,
tvec4<T, P> const & v); tvec4<T, P> const & v) GLM_NOEXCEPT;
/// Extract the real component of a quaternion. /// Extract the real component of a quaternion.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL T extractRealComponent( GLM_FUNC_DECL T extractRealComponent(
tquat<T, P> const & q); tquat<T, P> const & q) GLM_NOEXCEPT;
/// Converts a quaternion to a 3 * 3 matrix. /// Converts a quaternion to a 3 * 3 matrix.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> toMat3( GLM_FUNC_DECL tmat3x3<T, P> toMat3(
tquat<T, P> const & x){return mat3_cast(x);} tquat<T, P> const & x) GLM_NOEXCEPT {return mat3_cast(x);}
/// Converts a quaternion to a 4 * 4 matrix. /// Converts a quaternion to a 4 * 4 matrix.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> toMat4( GLM_FUNC_DECL tmat4x4<T, P> toMat4(
tquat<T, P> const & x){return mat4_cast(x);} tquat<T, P> const & x) GLM_NOEXCEPT {return mat4_cast(x);}
/// Converts a 3 * 3 matrix to a quaternion. /// Converts a 3 * 3 matrix to a quaternion.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tquat<T, P> toQuat( GLM_FUNC_DECL tquat<T, P> toQuat(
tmat3x3<T, P> const & x){return quat_cast(x);} tmat3x3<T, P> const & x) GLM_NOEXCEPT {return quat_cast(x);}
/// Converts a 4 * 4 matrix to a quaternion. /// Converts a 4 * 4 matrix to a quaternion.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tquat<T, P> toQuat( GLM_FUNC_DECL tquat<T, P> toQuat(
tmat4x4<T, P> const & x){return quat_cast(x);} tmat4x4<T, P> const & x) GLM_NOEXCEPT {return quat_cast(x);}
/// Quaternion interpolation using the rotation short path. /// Quaternion interpolation using the rotation short path.
/// ///
@ -181,7 +181,7 @@ namespace glm
GLM_FUNC_DECL tquat<T, P> shortMix( GLM_FUNC_DECL tquat<T, P> shortMix(
tquat<T, P> const & x, tquat<T, P> const & x,
tquat<T, P> const & y, tquat<T, P> const & y,
T const & a); T const & a) GLM_NOEXCEPT;
/// Quaternion normalized linear interpolation. /// Quaternion normalized linear interpolation.
/// ///
@ -190,7 +190,7 @@ namespace glm
GLM_FUNC_DECL tquat<T, P> fastMix( GLM_FUNC_DECL tquat<T, P> fastMix(
tquat<T, P> const & x, tquat<T, P> const & x,
tquat<T, P> const & y, tquat<T, P> const & y,
T const & a); T const & a) GLM_NOEXCEPT;
/// Compute the rotation between two vectors. /// Compute the rotation between two vectors.
/// param orig vector, needs to be normalized /// param orig vector, needs to be normalized
@ -200,13 +200,13 @@ namespace glm
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL tquat<T, P> rotation( GLM_FUNC_DECL tquat<T, P> rotation(
tvec3<T, P> const & orig, tvec3<T, P> const & orig,
tvec3<T, P> const & dest); tvec3<T, P> const & dest) GLM_NOEXCEPT;
/// Returns the squared length of x. /// Returns the squared length of x.
/// ///
/// @see gtx_quaternion /// @see gtx_quaternion
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_DECL T length2(tquat<T, P> const & q); GLM_FUNC_DECL T length2(tquat<T, P> const & q) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -40,7 +40,7 @@ namespace glm
( (
tvec3<T, P> const & v, tvec3<T, P> const & v,
tquat<T, P> const & q tquat<T, P> const & q
) ) GLM_NOEXCEPT
{ {
return inverse(q) * v; return inverse(q) * v;
} }
@ -50,7 +50,7 @@ namespace glm
( (
tquat<T, P> const & q, tquat<T, P> const & q,
tvec3<T, P> const & v tvec3<T, P> const & v
) ) GLM_NOEXCEPT
{ {
return q * v; return q * v;
} }
@ -62,7 +62,7 @@ namespace glm
tquat<T, P> const & q2, tquat<T, P> const & q2,
tquat<T, P> const & s1, tquat<T, P> const & s1,
tquat<T, P> const & s2, tquat<T, P> const & s2,
T const & h) T const & h) GLM_NOEXCEPT
{ {
return mix(mix(q1, q2, h), mix(s1, s2, h), static_cast<T>(2) * (static_cast<T>(1) - h) * h); return mix(mix(q1, q2, h), mix(s1, s2, h), static_cast<T>(2) * (static_cast<T>(1) - h) * h);
} }
@ -73,7 +73,7 @@ namespace glm
tquat<T, P> const & prev, tquat<T, P> const & prev,
tquat<T, P> const & curr, tquat<T, P> const & curr,
tquat<T, P> const & next tquat<T, P> const & next
) ) GLM_NOEXCEPT
{ {
tquat<T, P> invQuat = inverse(curr); tquat<T, P> invQuat = inverse(curr);
return exp((log(next + invQuat) + log(prev + invQuat)) / static_cast<T>(-4)) * curr; return exp((log(next + invQuat) + log(prev + invQuat)) / static_cast<T>(-4)) * curr;
@ -83,7 +83,7 @@ namespace glm
GLM_FUNC_QUALIFIER tquat<T, P> exp GLM_FUNC_QUALIFIER tquat<T, P> exp
( (
tquat<T, P> const & q tquat<T, P> const & q
) ) GLM_NOEXCEPT
{ {
tvec3<T, P> u(q.x, q.y, q.z); tvec3<T, P> u(q.x, q.y, q.z);
T Angle = glm::length(u); T Angle = glm::length(u);
@ -98,7 +98,7 @@ namespace glm
GLM_FUNC_QUALIFIER tquat<T, P> log GLM_FUNC_QUALIFIER tquat<T, P> log
( (
tquat<T, P> const & q tquat<T, P> const & q
) ) GLM_NOEXCEPT
{ {
tvec3<T, P> u(q.x, q.y, q.z); tvec3<T, P> u(q.x, q.y, q.z);
T Vec3Len = length(u); T Vec3Len = length(u);
@ -121,7 +121,7 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> pow(tquat<T, P> const & x, T const & y) GLM_FUNC_QUALIFIER tquat<T, P> pow(tquat<T, P> const & x, T const & y) GLM_NOEXCEPT
{ {
//Raising to the power of 0 should yield 1 //Raising to the power of 0 should yield 1
//Needed to prevent a division by 0 error later on //Needed to prevent a division by 0 error later on
@ -149,7 +149,7 @@ namespace glm
( (
tquat<T, P> const & q, tquat<T, P> const & q,
tvec3<T, P> const & v tvec3<T, P> const & v
) ) GLM_NOEXCEPT
{ {
return q * v; return q * v;
} }
@ -159,7 +159,7 @@ namespace glm
( (
tquat<T, P> const & q, tquat<T, P> const & q,
tvec4<T, P> const & v tvec4<T, P> const & v
) ) GLM_NOEXCEPT
{ {
return q * v; return q * v;
} }
@ -168,7 +168,7 @@ namespace glm
GLM_FUNC_QUALIFIER T extractRealComponent GLM_FUNC_QUALIFIER T extractRealComponent
( (
tquat<T, P> const & q tquat<T, P> const & q
) ) GLM_NOEXCEPT
{ {
T w = static_cast<T>(1) - q.x * q.x - q.y * q.y - q.z * q.z; T w = static_cast<T>(1) - q.x * q.x - q.y * q.y - q.z * q.z;
if(w < T(0)) if(w < T(0))
@ -181,7 +181,7 @@ namespace glm
GLM_FUNC_QUALIFIER T length2 GLM_FUNC_QUALIFIER T length2
( (
tquat<T, P> const & q tquat<T, P> const & q
) ) GLM_NOEXCEPT
{ {
return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w; return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w;
} }
@ -192,7 +192,7 @@ namespace glm
tquat<T, P> const & x, tquat<T, P> const & x,
tquat<T, P> const & y, tquat<T, P> const & y,
T const & a T const & a
) ) GLM_NOEXCEPT
{ {
if(a <= static_cast<T>(0)) return x; if(a <= static_cast<T>(0)) return x;
if(a >= static_cast<T>(1)) return y; if(a >= static_cast<T>(1)) return y;
@ -234,7 +234,7 @@ namespace glm
tquat<T, P> const & x, tquat<T, P> const & x,
tquat<T, P> const & y, tquat<T, P> const & y,
T const & a T const & a
) ) GLM_NOEXCEPT
{ {
return glm::normalize(x * (static_cast<T>(1) - a) + (y * a)); return glm::normalize(x * (static_cast<T>(1) - a) + (y * a));
} }
@ -244,7 +244,7 @@ namespace glm
( (
tvec3<T, P> const & orig, tvec3<T, P> const & orig,
tvec3<T, P> const & dest tvec3<T, P> const & dest
) ) GLM_NOEXCEPT
{ {
T cosTheta = dot(orig, dest); T cosTheta = dot(orig, dest);
tvec3<T, P> rotationAxis; tvec3<T, P> rotationAxis;

View File

@ -55,22 +55,22 @@ namespace detail
/* The glm types provide a .length() member, but for matrices /* The glm types provide a .length() member, but for matrices
this only defines the number of columns, so we need to work around this */ this only defines the number of columns, so we need to work around this */
template <typename T, precision P> template <typename T, precision P>
detail::component_count_t number_of_elements_(tvec2<T, P> const & v){ detail::component_count_t number_of_elements_(tvec2<T, P> const & v) GLM_NOEXCEPT {
return detail::component_count(v); return detail::component_count(v);
} }
template <typename T, precision P> template <typename T, precision P>
detail::component_count_t number_of_elements_(tvec3<T, P> const & v){ detail::component_count_t number_of_elements_(tvec3<T, P> const & v) GLM_NOEXCEPT {
return detail::component_count(v); return detail::component_count(v);
} }
template <typename T, precision P> template <typename T, precision P>
detail::component_count_t number_of_elements_(tvec4<T, P> const & v){ detail::component_count_t number_of_elements_(tvec4<T, P> const & v) GLM_NOEXCEPT {
return detail::component_count(v); return detail::component_count(v);
} }
template <typename genType> template <typename genType>
detail::component_count_t number_of_elements_(genType const & m){ detail::component_count_t number_of_elements_(genType const & m) GLM_NOEXCEPT {
return detail::component_count(m) * detail::component_count(m[0]); return detail::component_count(m) * detail::component_count(m[0]);
} }
}//namespace }//namespace
@ -79,22 +79,22 @@ namespace detail
/// @{ /// @{
template <typename genType> template <typename genType>
const typename genType::value_type * begin(genType const & v){ const typename genType::value_type * begin(genType const & v) GLM_NOEXCEPT {
return value_ptr(v); return value_ptr(v);
} }
template <typename genType> template <typename genType>
const typename genType::value_type * end(genType const & v){ const typename genType::value_type * end(genType const & v) GLM_NOEXCEPT {
return begin(v) + detail::number_of_elements_(v); return begin(v) + detail::number_of_elements_(v);
} }
template <typename genType> template <typename genType>
typename genType::value_type * begin(genType& v){ typename genType::value_type * begin(genType& v) GLM_NOEXCEPT {
return value_ptr(v); return value_ptr(v);
} }
template <typename genType> template <typename genType>
typename genType::value_type * end(genType& v){ typename genType::value_type * end(genType& v) GLM_NOEXCEPT {
return begin(v) + detail::number_of_elements_(v); return begin(v) + detail::number_of_elements_(v);
} }

View File

@ -72,7 +72,7 @@ namespace glm
GLM_FUNC_DECL tmat4x4<T, P> rotateNormalizedAxis( GLM_FUNC_DECL tmat4x4<T, P> rotateNormalizedAxis(
tmat4x4<T, P> const & m, tmat4x4<T, P> const & m,
T const & angle, T const & angle,
tvec3<T, P> const & axis); tvec3<T, P> const & axis) GLM_NOEXCEPT;
/// Rotates a quaternion from a vector of 3 components normalized axis and an angle. /// Rotates a quaternion from a vector of 3 components normalized axis and an angle.
/// ///
@ -85,7 +85,7 @@ namespace glm
GLM_FUNC_DECL tquat<T, P> rotateNormalizedAxis( GLM_FUNC_DECL tquat<T, P> rotateNormalizedAxis(
tquat<T, P> const & q, tquat<T, P> const & q,
T const & angle, T const & angle,
tvec3<T, P> const & axis); tvec3<T, P> const & axis) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -38,7 +38,7 @@ namespace glm
tmat4x4<T, P> const & m, tmat4x4<T, P> const & m,
T const & angle, T const & angle,
tvec3<T, P> const & v tvec3<T, P> const & v
) ) GLM_NOEXCEPT
{ {
T const a = angle; T const a = angle;
T const c = cos(a); T const c = cos(a);
@ -75,7 +75,7 @@ namespace glm
tquat<T, P> const & q, tquat<T, P> const & q,
T const & angle, T const & angle,
tvec3<T, P> const & v tvec3<T, P> const & v
) ) GLM_NOEXCEPT
{ {
tvec3<T, P> const Tmp(v); tvec3<T, P> const Tmp(v);

View File

@ -66,14 +66,14 @@ namespace glm
GLM_FUNC_DECL tvec3<T, P> slerp( GLM_FUNC_DECL tvec3<T, P> slerp(
tvec3<T, P> const & x, tvec3<T, P> const & x,
tvec3<T, P> const & y, tvec3<T, P> const & y,
T const & a); T const & a) GLM_NOEXCEPT;
//! Rotate a two dimensional vector. //! Rotate a two dimensional vector.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> rotate( GLM_FUNC_DECL tvec2<T, P> rotate(
tvec2<T, P> const & v, tvec2<T, P> const & v,
T const & angle); T const & angle) GLM_NOEXCEPT;
//! Rotate a three dimensional vector around an axis. //! Rotate a three dimensional vector around an axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
@ -81,7 +81,7 @@ namespace glm
GLM_FUNC_DECL tvec3<T, P> rotate( GLM_FUNC_DECL tvec3<T, P> rotate(
tvec3<T, P> const & v, tvec3<T, P> const & v,
T const & angle, T const & angle,
tvec3<T, P> const & normal); tvec3<T, P> const & normal) GLM_NOEXCEPT;
//! Rotate a four dimensional vector around an axis. //! Rotate a four dimensional vector around an axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
@ -89,56 +89,56 @@ namespace glm
GLM_FUNC_DECL tvec4<T, P> rotate( GLM_FUNC_DECL tvec4<T, P> rotate(
tvec4<T, P> const & v, tvec4<T, P> const & v,
T const & angle, T const & angle,
tvec3<T, P> const & normal); tvec3<T, P> const & normal) GLM_NOEXCEPT;
//! Rotate a three dimensional vector around the X axis. //! Rotate a three dimensional vector around the X axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> rotateX( GLM_FUNC_DECL tvec3<T, P> rotateX(
tvec3<T, P> const & v, tvec3<T, P> const & v,
T const & angle); T const & angle) GLM_NOEXCEPT;
//! Rotate a three dimensional vector around the Y axis. //! Rotate a three dimensional vector around the Y axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> rotateY( GLM_FUNC_DECL tvec3<T, P> rotateY(
tvec3<T, P> const & v, tvec3<T, P> const & v,
T const & angle); T const & angle) GLM_NOEXCEPT;
//! Rotate a three dimensional vector around the Z axis. //! Rotate a three dimensional vector around the Z axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> rotateZ( GLM_FUNC_DECL tvec3<T, P> rotateZ(
tvec3<T, P> const & v, tvec3<T, P> const & v,
T const & angle); T const & angle) GLM_NOEXCEPT;
//! Rotate a four dimentionnals vector around the X axis. //! Rotate a four dimentionnals vector around the X axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> rotateX( GLM_FUNC_DECL tvec4<T, P> rotateX(
tvec4<T, P> const & v, tvec4<T, P> const & v,
T const & angle); T const & angle) GLM_NOEXCEPT;
//! Rotate a four dimensional vector around the X axis. //! Rotate a four dimensional vector around the X axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> rotateY( GLM_FUNC_DECL tvec4<T, P> rotateY(
tvec4<T, P> const & v, tvec4<T, P> const & v,
T const & angle); T const & angle) GLM_NOEXCEPT;
//! Rotate a four dimensional vector around the X axis. //! Rotate a four dimensional vector around the X axis.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> rotateZ( GLM_FUNC_DECL tvec4<T, P> rotateZ(
tvec4<T, P> const & v, tvec4<T, P> const & v,
T const & angle); T const & angle) GLM_NOEXCEPT;
//! Build a rotation matrix from a normal and a up vector. //! Build a rotation matrix from a normal and a up vector.
//! From GLM_GTX_rotate_vector extension. //! From GLM_GTX_rotate_vector extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> orientation( GLM_FUNC_DECL tmat4x4<T, P> orientation(
tvec3<T, P> const & Normal, tvec3<T, P> const & Normal,
tvec3<T, P> const & Up); tvec3<T, P> const & Up) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -38,7 +38,7 @@ namespace glm
tvec3<T, P> const & x, tvec3<T, P> const & x,
tvec3<T, P> const & y, tvec3<T, P> const & y,
T const & a T const & a
) ) GLM_NOEXCEPT
{ {
// get cosine of angle between vectors (-1 -> 1) // get cosine of angle between vectors (-1 -> 1)
T CosAlpha = dot(x, y); T CosAlpha = dot(x, y);
@ -59,7 +59,7 @@ namespace glm
( (
tvec2<T, P> const & v, tvec2<T, P> const & v,
T const & angle T const & angle
) ) GLM_NOEXCEPT
{ {
tvec2<T, P> Result; tvec2<T, P> Result;
T const Cos(cos(angle)); T const Cos(cos(angle));
@ -76,7 +76,7 @@ namespace glm
tvec3<T, P> const & v, tvec3<T, P> const & v,
T const & angle, T const & angle,
tvec3<T, P> const & normal tvec3<T, P> const & normal
) ) GLM_NOEXCEPT
{ {
return tmat3x3<T, P>(glm::rotate(angle, normal)) * v; return tmat3x3<T, P>(glm::rotate(angle, normal)) * v;
} }
@ -98,7 +98,7 @@ namespace glm
tvec4<T, P> const & v, tvec4<T, P> const & v,
T const & angle, T const & angle,
tvec3<T, P> const & normal tvec3<T, P> const & normal
) ) GLM_NOEXCEPT
{ {
return rotate(angle, normal) * v; return rotate(angle, normal) * v;
} }
@ -108,7 +108,7 @@ namespace glm
( (
tvec3<T, P> const & v, tvec3<T, P> const & v,
T const & angle T const & angle
) ) GLM_NOEXCEPT
{ {
tvec3<T, P> Result(v); tvec3<T, P> Result(v);
T const Cos(cos(angle)); T const Cos(cos(angle));
@ -124,7 +124,7 @@ namespace glm
( (
tvec3<T, P> const & v, tvec3<T, P> const & v,
T const & angle T const & angle
) ) GLM_NOEXCEPT
{ {
tvec3<T, P> Result = v; tvec3<T, P> Result = v;
T const Cos(cos(angle)); T const Cos(cos(angle));
@ -140,7 +140,7 @@ namespace glm
( (
tvec3<T, P> const & v, tvec3<T, P> const & v,
T const & angle T const & angle
) ) GLM_NOEXCEPT
{ {
tvec3<T, P> Result = v; tvec3<T, P> Result = v;
T const Cos(cos(angle)); T const Cos(cos(angle));
@ -156,7 +156,7 @@ namespace glm
( (
tvec4<T, P> const & v, tvec4<T, P> const & v,
T const & angle T const & angle
) ) GLM_NOEXCEPT
{ {
tvec4<T, P> Result = v; tvec4<T, P> Result = v;
T const Cos(cos(angle)); T const Cos(cos(angle));
@ -172,7 +172,7 @@ namespace glm
( (
tvec4<T, P> const & v, tvec4<T, P> const & v,
T const & angle T const & angle
) ) GLM_NOEXCEPT
{ {
tvec4<T, P> Result = v; tvec4<T, P> Result = v;
T const Cos(cos(angle)); T const Cos(cos(angle));
@ -188,7 +188,7 @@ namespace glm
( (
tvec4<T, P> const & v, tvec4<T, P> const & v,
T const & angle T const & angle
) ) GLM_NOEXCEPT
{ {
tvec4<T, P> Result = v; tvec4<T, P> Result = v;
T const Cos(cos(angle)); T const Cos(cos(angle));
@ -204,7 +204,7 @@ namespace glm
( (
tvec3<T, P> const & Normal, tvec3<T, P> const & Normal,
tvec3<T, P> const & Up tvec3<T, P> const & Up
) ) GLM_NOEXCEPT
{ {
if(all(equal(Normal, Up))) if(all(equal(Normal, Up)))
return tmat4x4<T, P>(T(1)); return tmat4x4<T, P>(T(1));

View File

@ -64,19 +64,19 @@ namespace glm
#define GLM_IMPLEMENT_SCAL_MULT(Vec) \ #define GLM_IMPLEMENT_SCAL_MULT(Vec) \
template <typename T> \ template <typename T> \
return_type_scalar_multiplication<T, Vec> \ return_type_scalar_multiplication<T, Vec> \
operator*(T const & s, Vec rh){ \ operator*(T const & s, Vec rh) GLM_NOEXCEPT { \
return rh *= static_cast<float>(s); \ return rh *= static_cast<float>(s); \
} \ } \
\ \
template <typename T> \ template <typename T> \
return_type_scalar_multiplication<T, Vec> \ return_type_scalar_multiplication<T, Vec> \
operator*(Vec lh, T const & s){ \ operator*(Vec lh, T const & s) GLM_NOEXCEPT { \
return lh *= static_cast<float>(s); \ return lh *= static_cast<float>(s); \
} \ } \
\ \
template <typename T> \ template <typename T> \
return_type_scalar_multiplication<T, Vec> \ return_type_scalar_multiplication<T, Vec> \
operator/(Vec lh, T const & s){ \ operator/(Vec lh, T const & s) GLM_NOEXCEPT { \
return lh *= 1.0f / s; \ return lh *= 1.0f / s; \
} }

View File

@ -37,7 +37,7 @@ namespace glm
( (
T const & x, T const & x,
T const & y T const & y
) ) GLM_NOEXCEPT
{ {
return x < y; return x < y;
} }
@ -47,7 +47,7 @@ namespace glm
( (
T const & x, T const & x,
T const & y T const & y
) ) GLM_NOEXCEPT
{ {
return x <= y; return x <= y;
} }
@ -57,7 +57,7 @@ namespace glm
( (
T const & x, T const & x,
T const & y T const & y
) ) GLM_NOEXCEPT
{ {
return x > y; return x > y;
} }
@ -67,7 +67,7 @@ namespace glm
( (
T const & x, T const & x,
T const & y T const & y
) ) GLM_NOEXCEPT
{ {
return x >= y; return x >= y;
} }
@ -77,7 +77,7 @@ namespace glm
( (
T const & x, T const & x,
T const & y T const & y
) ) GLM_NOEXCEPT
{ {
return x == y; return x == y;
} }
@ -87,7 +87,7 @@ namespace glm
( (
T const & x, T const & x,
T const & y T const & y
) ) GLM_NOEXCEPT
{ {
return x != y; return x != y;
} }
@ -95,7 +95,7 @@ namespace glm
GLM_FUNC_QUALIFIER bool any GLM_FUNC_QUALIFIER bool any
( (
bool const & x bool const & x
) ) GLM_NOEXCEPT
{ {
return x; return x;
} }
@ -103,7 +103,7 @@ namespace glm
GLM_FUNC_QUALIFIER bool all GLM_FUNC_QUALIFIER bool all
( (
bool const & x bool const & x
) ) GLM_NOEXCEPT
{ {
return x; return x;
} }
@ -111,7 +111,7 @@ namespace glm
GLM_FUNC_QUALIFIER bool not_ GLM_FUNC_QUALIFIER bool not_
( (
bool const & x bool const & x
) ) GLM_NOEXCEPT
{ {
return !x; return !x;
} }

View File

@ -62,7 +62,7 @@ namespace glm
genType const & v2, genType const & v2,
genType const & v3, genType const & v3,
genType const & v4, genType const & v4,
typename genType::value_type const & s); typename genType::value_type const & s) GLM_NOEXCEPT;
/// Return a point from a hermite curve. /// Return a point from a hermite curve.
/// @see gtx_spline extension. /// @see gtx_spline extension.
@ -72,7 +72,7 @@ namespace glm
genType const & t1, genType const & t1,
genType const & v2, genType const & v2,
genType const & t2, genType const & t2,
typename genType::value_type const & s); typename genType::value_type const & s) GLM_NOEXCEPT;
/// Return a point from a cubic curve. /// Return a point from a cubic curve.
/// @see gtx_spline extension. /// @see gtx_spline extension.
@ -82,7 +82,7 @@ namespace glm
genType const & v2, genType const & v2,
genType const & v3, genType const & v3,
genType const & v4, genType const & v4,
typename genType::value_type const & s); typename genType::value_type const & s) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -40,7 +40,7 @@ namespace glm
genType const & v3, genType const & v3,
genType const & v4, genType const & v4,
typename genType::value_type const & s typename genType::value_type const & s
) ) GLM_NOEXCEPT
{ {
typename genType::value_type s1 = s; typename genType::value_type s1 = s;
typename genType::value_type s2 = pow2(s); typename genType::value_type s2 = pow2(s);
@ -63,7 +63,7 @@ namespace glm
genType const & v2, genType const & v2,
genType const & t2, genType const & t2,
typename genType::value_type const & s typename genType::value_type const & s
) ) GLM_NOEXCEPT
{ {
typename genType::value_type s1 = s; typename genType::value_type s1 = s;
typename genType::value_type s2 = pow2(s); typename genType::value_type s2 = pow2(s);
@ -85,7 +85,7 @@ namespace glm
genType const & v3, genType const & v3,
genType const & v4, genType const & v4,
typename genType::value_type const & s typename genType::value_type const & s
) ) GLM_NOEXCEPT
{ {
return ((v1 * s + v2) * s + v3) * s + v4; return ((v1 * s + v2) * s + v3) * s + v4;
} }

View File

@ -68,7 +68,7 @@ namespace glm
/// Create a string from a GLM vector or matrix typed variable. /// Create a string from a GLM vector or matrix typed variable.
/// @see gtx_string_cast extension. /// @see gtx_string_cast extension.
template <template <typename, precision> class matType, typename T, precision P> template <template <typename, precision> class matType, typename T, precision P>
GLM_FUNC_DECL std::string to_string(matType<T, P> const & x); GLM_FUNC_DECL std::string to_string(matType<T, P> const & x) GLM_NOEXCEPT;
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -36,7 +36,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
GLM_FUNC_QUALIFIER std::string format(const char* msg, ...) GLM_FUNC_QUALIFIER std::string format(const char* msg, ...) GLM_NOEXCEPT
{ {
std::size_t const STRING_BUFFER(4096); std::size_t const STRING_BUFFER(4096);
char text[STRING_BUFFER]; char text[STRING_BUFFER];
@ -62,26 +62,26 @@ namespace detail
template <typename T, bool isFloat = false> template <typename T, bool isFloat = false>
struct literal struct literal
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "%d";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "%d";};
}; };
template <typename T> template <typename T>
struct literal<T, true> struct literal<T, true>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "%f";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "%f";};
}; };
# if GLM_MODEL == GLM_MODEL_32 && GLM_COMPILER && GLM_COMPILER_VC # if GLM_MODEL == GLM_MODEL_32 && GLM_COMPILER && GLM_COMPILER_VC
template <> template <>
struct literal<uint64_t, false> struct literal<uint64_t, false>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "%lld";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "%lld";};
}; };
template <> template <>
struct literal<int64_t, false> struct literal<int64_t, false>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "%lld";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "%lld";};
}; };
# endif//GLM_MODEL == GLM_MODEL_32 && GLM_COMPILER && GLM_COMPILER_VC # endif//GLM_MODEL == GLM_MODEL_32 && GLM_COMPILER && GLM_COMPILER_VC
@ -91,67 +91,67 @@ namespace detail
template <> template <>
struct prefix<float> struct prefix<float>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "";};
}; };
template <> template <>
struct prefix<double> struct prefix<double>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "d";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "d";};
}; };
template <> template <>
struct prefix<bool> struct prefix<bool>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "b";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "b";};
}; };
template <> template <>
struct prefix<uint8_t> struct prefix<uint8_t>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "u8";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "u8";};
}; };
template <> template <>
struct prefix<int8_t> struct prefix<int8_t>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "i8";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "i8";};
}; };
template <> template <>
struct prefix<uint16_t> struct prefix<uint16_t>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "u16";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "u16";};
}; };
template <> template <>
struct prefix<int16_t> struct prefix<int16_t>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "i16";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "i16";};
}; };
template <> template <>
struct prefix<uint32_t> struct prefix<uint32_t>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "u";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "u";};
}; };
template <> template <>
struct prefix<int32_t> struct prefix<int32_t>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "i";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "i";};
}; };
template <> template <>
struct prefix<uint64_t> struct prefix<uint64_t>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "u64";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "u64";};
}; };
template <> template <>
struct prefix<int64_t> struct prefix<int64_t>
{ {
GLM_FUNC_QUALIFIER static char const * value() {return "i64";}; GLM_FUNC_QUALIFIER static char const * value() GLM_NOEXCEPT {return "i64";};
}; };
template <template <typename, precision> class matType, typename T, precision P> template <template <typename, precision> class matType, typename T, precision P>
@ -161,7 +161,7 @@ namespace detail
template <precision P> template <precision P>
struct compute_to_string<tvec1, bool, P> struct compute_to_string<tvec1, bool, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tvec1<bool, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tvec1<bool, P> const & x) GLM_NOEXCEPT
{ {
return detail::format("bvec1(%s)", return detail::format("bvec1(%s)",
x[0] ? detail::LabelTrue : detail::LabelFalse); x[0] ? detail::LabelTrue : detail::LabelFalse);
@ -171,7 +171,7 @@ namespace detail
template <precision P> template <precision P>
struct compute_to_string<tvec2, bool, P> struct compute_to_string<tvec2, bool, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tvec2<bool, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tvec2<bool, P> const & x) GLM_NOEXCEPT
{ {
return detail::format("bvec2(%s, %s)", return detail::format("bvec2(%s, %s)",
x[0] ? detail::LabelTrue : detail::LabelFalse, x[0] ? detail::LabelTrue : detail::LabelFalse,
@ -182,7 +182,7 @@ namespace detail
template <precision P> template <precision P>
struct compute_to_string<tvec3, bool, P> struct compute_to_string<tvec3, bool, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tvec3<bool, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tvec3<bool, P> const & x) GLM_NOEXCEPT
{ {
return detail::format("bvec3(%s, %s, %s)", return detail::format("bvec3(%s, %s, %s)",
x[0] ? detail::LabelTrue : detail::LabelFalse, x[0] ? detail::LabelTrue : detail::LabelFalse,
@ -194,7 +194,7 @@ namespace detail
template <precision P> template <precision P>
struct compute_to_string<tvec4, bool, P> struct compute_to_string<tvec4, bool, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tvec4<bool, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tvec4<bool, P> const & x) GLM_NOEXCEPT
{ {
return detail::format("bvec4(%s, %s, %s, %s)", return detail::format("bvec4(%s, %s, %s, %s)",
x[0] ? detail::LabelTrue : detail::LabelFalse, x[0] ? detail::LabelTrue : detail::LabelFalse,
@ -207,7 +207,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tvec1, T, P> struct compute_to_string<tvec1, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tvec1<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tvec1<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -222,7 +222,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tvec2, T, P> struct compute_to_string<tvec2, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tvec2<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tvec2<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -237,7 +237,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tvec3, T, P> struct compute_to_string<tvec3, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tvec3<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tvec3<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -252,7 +252,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tvec4, T, P> struct compute_to_string<tvec4, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tvec4<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tvec4<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -268,7 +268,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tmat2x2, T, P> struct compute_to_string<tmat2x2, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tmat2x2<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tmat2x2<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -286,7 +286,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tmat2x3, T, P> struct compute_to_string<tmat2x3, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tmat2x3<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tmat2x3<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -304,7 +304,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tmat2x4, T, P> struct compute_to_string<tmat2x4, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tmat2x4<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tmat2x4<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -322,7 +322,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tmat3x2, T, P> struct compute_to_string<tmat3x2, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tmat3x2<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tmat3x2<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -342,7 +342,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tmat3x3, T, P> struct compute_to_string<tmat3x3, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tmat3x3<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tmat3x3<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -362,7 +362,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tmat3x4, T, P> struct compute_to_string<tmat3x4, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tmat3x4<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tmat3x4<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -382,7 +382,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tmat4x2, T, P> struct compute_to_string<tmat4x2, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tmat4x2<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tmat4x2<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -404,7 +404,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tmat4x3, T, P> struct compute_to_string<tmat4x3, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tmat4x3<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tmat4x3<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -426,7 +426,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tmat4x4, T, P> struct compute_to_string<tmat4x4, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tmat4x4<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tmat4x4<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -449,7 +449,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tquat, T, P> struct compute_to_string<tquat, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tquat<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tquat<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -464,7 +464,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_to_string<tdualquat, T, P> struct compute_to_string<tdualquat, T, P>
{ {
GLM_FUNC_QUALIFIER static std::string call(tdualquat<T, P> const & x) GLM_FUNC_QUALIFIER static std::string call(tdualquat<T, P> const & x) GLM_NOEXCEPT
{ {
char const * PrefixStr = prefix<T>::value(); char const * PrefixStr = prefix<T>::value();
char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value(); char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@ -479,7 +479,7 @@ namespace detail
}//namespace detail }//namespace detail
template <template <typename, precision> class matType, typename T, precision P> template <template <typename, precision> class matType, typename T, precision P>
GLM_FUNC_DECL std::string to_string(matType<T, P> const & x) GLM_FUNC_DECL std::string to_string(matType<T, P> const & x) GLM_NOEXCEPT
{ {
return detail::compute_to_string<matType, T, P>::call(x); return detail::compute_to_string<matType, T, P>::call(x);
} }

View File

@ -62,7 +62,7 @@ namespace glm
/// @see gtx_transform /// @see gtx_transform
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> translate( GLM_FUNC_DECL tmat4x4<T, P> translate(
tvec3<T, P> const & v); tvec3<T, P> const & v) GLM_NOEXCEPT;
/// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. /// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
@ -70,14 +70,14 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> rotate( GLM_FUNC_DECL tmat4x4<T, P> rotate(
T angle, T angle,
tvec3<T, P> const & v); tvec3<T, P> const & v) GLM_NOEXCEPT;
/// Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components. /// Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see gtx_transform /// @see gtx_transform
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> scale( GLM_FUNC_DECL tmat4x4<T, P> scale(
tvec3<T, P> const & v); tvec3<T, P> const & v) GLM_NOEXCEPT;
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -34,7 +34,7 @@ namespace glm
{ {
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> translate( GLM_FUNC_QUALIFIER tmat4x4<T, P> translate(
tvec3<T, P> const & v) tvec3<T, P> const & v) GLM_NOEXCEPT
{ {
return translate( return translate(
tmat4x4<T, P>(1.0f), v); tmat4x4<T, P>(1.0f), v);
@ -43,7 +43,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate( GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate(
T angle, T angle,
tvec3<T, P> const & v) tvec3<T, P> const & v) GLM_NOEXCEPT
{ {
return rotate( return rotate(
tmat4x4<T, P>(1), angle, v); tmat4x4<T, P>(1), angle, v);
@ -51,7 +51,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> scale( GLM_FUNC_QUALIFIER tmat4x4<T, P> scale(
tvec3<T, P> const & v) tvec3<T, P> const & v) GLM_NOEXCEPT
{ {
return scale( return scale(
tmat4x4<T, P>(1.0f), v); tmat4x4<T, P>(1.0f), v);

View File

@ -60,14 +60,14 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> shearX2D( GLM_FUNC_DECL tmat3x3<T, P> shearX2D(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T y); T y) GLM_NOEXCEPT;
//! Transforms a matrix with a shearing on Y axis. //! Transforms a matrix with a shearing on Y axis.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> shearY2D( GLM_FUNC_DECL tmat3x3<T, P> shearY2D(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T x); T x) GLM_NOEXCEPT;
//! Transforms a matrix with a shearing on X axis //! Transforms a matrix with a shearing on X axis
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
@ -75,7 +75,7 @@ namespace glm
GLM_FUNC_DECL tmat4x4<T, P> shearX3D( GLM_FUNC_DECL tmat4x4<T, P> shearX3D(
const tmat4x4<T, P> & m, const tmat4x4<T, P> & m,
T y, T y,
T z); T z) GLM_NOEXCEPT;
//! Transforms a matrix with a shearing on Y axis. //! Transforms a matrix with a shearing on Y axis.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
@ -83,7 +83,7 @@ namespace glm
GLM_FUNC_DECL tmat4x4<T, P> shearY3D( GLM_FUNC_DECL tmat4x4<T, P> shearY3D(
const tmat4x4<T, P> & m, const tmat4x4<T, P> & m,
T x, T x,
T z); T z) GLM_NOEXCEPT;
//! Transforms a matrix with a shearing on Z axis. //! Transforms a matrix with a shearing on Z axis.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
@ -91,9 +91,9 @@ namespace glm
GLM_FUNC_DECL tmat4x4<T, P> shearZ3D( GLM_FUNC_DECL tmat4x4<T, P> shearZ3D(
const tmat4x4<T, P> & m, const tmat4x4<T, P> & m,
T x, T x,
T y); T y) GLM_NOEXCEPT;
//template <typename T> GLM_FUNC_QUALIFIER tmat4x4<T, P> shear(const tmat4x4<T, P> & m, shearPlane, planePoint, angle) //template <typename T> GLM_FUNC_QUALIFIER tmat4x4<T, P> shear(const tmat4x4<T, P> & m, shearPlane, planePoint, angle) GLM_NOEXCEPT
// Identity + tan(angle) * cross(Normal, OnPlaneVector) 0 // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0
// - dot(PointOnPlane, normal) * OnPlaneVector 1 // - dot(PointOnPlane, normal) * OnPlaneVector 1
@ -106,21 +106,21 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> proj2D( GLM_FUNC_DECL tmat3x3<T, P> proj2D(
const tmat3x3<T, P> & m, const tmat3x3<T, P> & m,
const tvec3<T, P>& normal); const tvec3<T, P>& normal) GLM_NOEXCEPT;
//! Build planar projection matrix along normal axis. //! Build planar projection matrix along normal axis.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> proj3D( GLM_FUNC_DECL tmat4x4<T, P> proj3D(
const tmat4x4<T, P> & m, const tmat4x4<T, P> & m,
const tvec3<T, P>& normal); const tvec3<T, P>& normal) GLM_NOEXCEPT;
//! Build a scale bias matrix. //! Build a scale bias matrix.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
template <typename valType, precision P> template <typename valType, precision P>
GLM_FUNC_DECL tmat4x4<valType, P> scaleBias( GLM_FUNC_DECL tmat4x4<valType, P> scaleBias(
valType scale, valType scale,
valType bias); valType bias) GLM_NOEXCEPT;
//! Build a scale bias matrix. //! Build a scale bias matrix.
//! From GLM_GTX_transform2 extension. //! From GLM_GTX_transform2 extension.
@ -128,7 +128,7 @@ namespace glm
GLM_FUNC_DECL tmat4x4<valType, P> scaleBias( GLM_FUNC_DECL tmat4x4<valType, P> scaleBias(
tmat4x4<valType, P> const & m, tmat4x4<valType, P> const & m,
valType scale, valType scale,
valType bias); valType bias) GLM_NOEXCEPT;
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -35,7 +35,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX2D( GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX2D(
const tmat3x3<T, P>& m, const tmat3x3<T, P>& m,
T s) T s) GLM_NOEXCEPT
{ {
tmat3x3<T, P> r(1); tmat3x3<T, P> r(1);
r[0][1] = s; r[0][1] = s;
@ -45,7 +45,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY2D( GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY2D(
const tmat3x3<T, P>& m, const tmat3x3<T, P>& m,
T s) T s) GLM_NOEXCEPT
{ {
tmat3x3<T, P> r(1); tmat3x3<T, P> r(1);
r[1][0] = s; r[1][0] = s;
@ -56,7 +56,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x4<T, P> shearX3D( GLM_FUNC_QUALIFIER tmat4x4<T, P> shearX3D(
const tmat4x4<T, P>& m, const tmat4x4<T, P>& m,
T s, T s,
T t) T t) GLM_NOEXCEPT
{ {
tmat4x4<T, P> r(1); tmat4x4<T, P> r(1);
r[1][0] = s; r[1][0] = s;
@ -68,7 +68,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x4<T, P> shearY3D( GLM_FUNC_QUALIFIER tmat4x4<T, P> shearY3D(
const tmat4x4<T, P>& m, const tmat4x4<T, P>& m,
T s, T s,
T t) T t) GLM_NOEXCEPT
{ {
tmat4x4<T, P> r(1); tmat4x4<T, P> r(1);
r[0][1] = s; r[0][1] = s;
@ -80,7 +80,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x4<T, P> shearZ3D( GLM_FUNC_QUALIFIER tmat4x4<T, P> shearZ3D(
const tmat4x4<T, P>& m, const tmat4x4<T, P>& m,
T s, T s,
T t) T t) GLM_NOEXCEPT
{ {
tmat4x4<T, P> r(1); tmat4x4<T, P> r(1);
r[0][2] = s; r[0][2] = s;
@ -91,7 +91,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> reflect2D( GLM_FUNC_QUALIFIER tmat3x3<T, P> reflect2D(
const tmat3x3<T, P>& m, const tmat3x3<T, P>& m,
const tvec3<T, P>& normal) const tvec3<T, P>& normal) GLM_NOEXCEPT
{ {
tmat3x3<T, P> r(1); tmat3x3<T, P> r(1);
r[0][0] = 1 - 2 * normal.x * normal.x; r[0][0] = 1 - 2 * normal.x * normal.x;
@ -104,7 +104,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> reflect3D( GLM_FUNC_QUALIFIER tmat4x4<T, P> reflect3D(
const tmat4x4<T, P>& m, const tmat4x4<T, P>& m,
const tvec3<T, P>& normal) const tvec3<T, P>& normal) GLM_NOEXCEPT
{ {
tmat4x4<T, P> r(1); tmat4x4<T, P> r(1);
r[0][0] = 1 - 2 * normal.x * normal.x; r[0][0] = 1 - 2 * normal.x * normal.x;
@ -124,7 +124,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> proj2D( GLM_FUNC_QUALIFIER tmat3x3<T, P> proj2D(
const tmat3x3<T, P>& m, const tmat3x3<T, P>& m,
const tvec3<T, P>& normal) const tvec3<T, P>& normal) GLM_NOEXCEPT
{ {
tmat3x3<T, P> r(1); tmat3x3<T, P> r(1);
r[0][0] = 1 - normal.x * normal.x; r[0][0] = 1 - normal.x * normal.x;
@ -137,7 +137,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> proj3D( GLM_FUNC_QUALIFIER tmat4x4<T, P> proj3D(
const tmat4x4<T, P>& m, const tmat4x4<T, P>& m,
const tvec3<T, P>& normal) const tvec3<T, P>& normal) GLM_NOEXCEPT
{ {
tmat4x4<T, P> r(1); tmat4x4<T, P> r(1);
r[0][0] = 1 - normal.x * normal.x; r[0][0] = 1 - normal.x * normal.x;
@ -155,7 +155,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias( GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias(
T scale, T scale,
T bias) T bias) GLM_NOEXCEPT
{ {
tmat4x4<T, P> result; tmat4x4<T, P> result;
result[3] = tvec4<T, P>(tvec3<T, P>(bias), T(1)); result[3] = tvec4<T, P>(tvec3<T, P>(bias), T(1));
@ -169,7 +169,7 @@ namespace glm
GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias( GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias(
const tmat4x4<T, P>& m, const tmat4x4<T, P>& m,
T scale, T scale,
T bias) T bias) GLM_NOEXCEPT
{ {
return m * scaleBias(scale, bias); return m * scaleBias(scale, bias);
} }

View File

@ -64,7 +64,7 @@ namespace glm
template <typename vecType> template <typename vecType>
GLM_FUNC_DECL typename vecType::value_type angle( GLM_FUNC_DECL typename vecType::value_type angle(
vecType const & x, vecType const & x,
vecType const & y); vecType const & y) GLM_NOEXCEPT;
//! Returns the oriented angle between two 2d vectors //! Returns the oriented angle between two 2d vectors
//! Parameters need to be normalized. //! Parameters need to be normalized.
@ -72,7 +72,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL T orientedAngle( GLM_FUNC_DECL T orientedAngle(
tvec2<T, P> const & x, tvec2<T, P> const & x,
tvec2<T, P> const & y); tvec2<T, P> const & y) GLM_NOEXCEPT;
//! Returns the oriented angle between two 3d vectors based from a reference axis. //! Returns the oriented angle between two 3d vectors based from a reference axis.
//! Parameters need to be normalized. //! Parameters need to be normalized.
@ -81,7 +81,7 @@ namespace glm
GLM_FUNC_DECL T orientedAngle( GLM_FUNC_DECL T orientedAngle(
tvec3<T, P> const & x, tvec3<T, P> const & x,
tvec3<T, P> const & y, tvec3<T, P> const & y,
tvec3<T, P> const & ref); tvec3<T, P> const & ref) GLM_NOEXCEPT;
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -37,7 +37,7 @@ namespace glm
( (
genType const & x, genType const & x,
genType const & y genType const & y
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'angle' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'angle' only accept floating-point inputs");
return acos(clamp(dot(x, y), genType(-1), genType(1))); return acos(clamp(dot(x, y), genType(-1), genType(1)));
@ -48,7 +48,7 @@ namespace glm
( (
vecType<T, P> const & x, vecType<T, P> const & x,
vecType<T, P> const & y vecType<T, P> const & y
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'angle' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'angle' only accept floating-point inputs");
return acos(clamp(dot(x, y), T(-1), T(1))); return acos(clamp(dot(x, y), T(-1), T(1)));
@ -60,7 +60,7 @@ namespace glm
( (
tvec2<T, P> const & x, tvec2<T, P> const & x,
tvec2<T, P> const & y tvec2<T, P> const & y
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'orientedAngle' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'orientedAngle' only accept floating-point inputs");
T const Angle(acos(clamp(dot(x, y), T(-1), T(1)))); T const Angle(acos(clamp(dot(x, y), T(-1), T(1))));
@ -77,7 +77,7 @@ namespace glm
tvec3<T, P> const & x, tvec3<T, P> const & x,
tvec3<T, P> const & y, tvec3<T, P> const & y,
tvec3<T, P> const & ref tvec3<T, P> const & ref
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'orientedAngle' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'orientedAngle' only accept floating-point inputs");

View File

@ -58,32 +58,32 @@ namespace glm
//! Check whether two vectors are collinears. //! Check whether two vectors are collinears.
/// @see gtx_vector_query extensions. /// @see gtx_vector_query extensions.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool areCollinear(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon); GLM_FUNC_DECL bool areCollinear(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon) GLM_NOEXCEPT;
//! Check whether two vectors are orthogonals. //! Check whether two vectors are orthogonals.
/// @see gtx_vector_query extensions. /// @see gtx_vector_query extensions.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool areOrthogonal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon); GLM_FUNC_DECL bool areOrthogonal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon) GLM_NOEXCEPT;
//! Check whether a vector is normalized. //! Check whether a vector is normalized.
/// @see gtx_vector_query extensions. /// @see gtx_vector_query extensions.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool isNormalized(vecType<T, P> const & v, T const & epsilon); GLM_FUNC_DECL bool isNormalized(vecType<T, P> const & v, T const & epsilon) GLM_NOEXCEPT;
//! Check whether a vector is null. //! Check whether a vector is null.
/// @see gtx_vector_query extensions. /// @see gtx_vector_query extensions.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool isNull(vecType<T, P> const & v, T const & epsilon); GLM_FUNC_DECL bool isNull(vecType<T, P> const & v, T const & epsilon) GLM_NOEXCEPT;
//! Check whether a each component of a vector is null. //! Check whether a each component of a vector is null.
/// @see gtx_vector_query extensions. /// @see gtx_vector_query extensions.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<bool, P> isCompNull(vecType<T, P> const & v, T const & epsilon); GLM_FUNC_DECL vecType<bool, P> isCompNull(vecType<T, P> const & v, T const & epsilon) GLM_NOEXCEPT;
//! Check whether two vectors are orthonormal. //! Check whether two vectors are orthonormal.
/// @see gtx_vector_query extensions. /// @see gtx_vector_query extensions.
template <typename T, precision P, template <typename, precision> class vecType> template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool areOrthonormal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon); GLM_FUNC_DECL bool areOrthonormal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon) GLM_NOEXCEPT;
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -41,7 +41,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_areCollinear<T, P, tvec2> struct compute_areCollinear<T, P, tvec2>
{ {
GLM_FUNC_QUALIFIER static bool call(tvec2<T, P> const & v0, tvec2<T, P> const & v1, T const & epsilon) GLM_FUNC_QUALIFIER static bool call(tvec2<T, P> const & v0, tvec2<T, P> const & v1, T const & epsilon) GLM_NOEXCEPT
{ {
return length(cross(tvec3<T, P>(v0, static_cast<T>(0)), tvec3<T, P>(v1, static_cast<T>(0)))) < epsilon; return length(cross(tvec3<T, P>(v0, static_cast<T>(0)), tvec3<T, P>(v1, static_cast<T>(0)))) < epsilon;
} }
@ -50,7 +50,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_areCollinear<T, P, tvec3> struct compute_areCollinear<T, P, tvec3>
{ {
GLM_FUNC_QUALIFIER static bool call(tvec3<T, P> const & v0, tvec3<T, P> const & v1, T const & epsilon) GLM_FUNC_QUALIFIER static bool call(tvec3<T, P> const & v0, tvec3<T, P> const & v1, T const & epsilon) GLM_NOEXCEPT
{ {
return length(cross(v0, v1)) < epsilon; return length(cross(v0, v1)) < epsilon;
} }
@ -59,7 +59,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_areCollinear<T, P, tvec4> struct compute_areCollinear<T, P, tvec4>
{ {
GLM_FUNC_QUALIFIER static bool call(tvec4<T, P> const & v0, tvec4<T, P> const & v1, T const & epsilon) GLM_FUNC_QUALIFIER static bool call(tvec4<T, P> const & v0, tvec4<T, P> const & v1, T const & epsilon) GLM_NOEXCEPT
{ {
return length(cross(tvec3<T, P>(v0), tvec3<T, P>(v1))) < epsilon; return length(cross(tvec3<T, P>(v0), tvec3<T, P>(v1))) < epsilon;
} }
@ -71,7 +71,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_isCompNull<T, P, tvec2> struct compute_isCompNull<T, P, tvec2>
{ {
GLM_FUNC_QUALIFIER static tvec2<bool, P> call(tvec2<T, P> const & v, T const & epsilon) GLM_FUNC_QUALIFIER static tvec2<bool, P> call(tvec2<T, P> const & v, T const & epsilon) GLM_NOEXCEPT
{ {
return tvec2<bool, P>( return tvec2<bool, P>(
(abs(v.x) < epsilon), (abs(v.x) < epsilon),
@ -82,7 +82,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_isCompNull<T, P, tvec3> struct compute_isCompNull<T, P, tvec3>
{ {
GLM_FUNC_QUALIFIER static tvec3<bool, P> call(tvec3<T, P> const & v, T const & epsilon) GLM_FUNC_QUALIFIER static tvec3<bool, P> call(tvec3<T, P> const & v, T const & epsilon) GLM_NOEXCEPT
{ {
return tvec3<bool, P>( return tvec3<bool, P>(
(abs(v.x) < epsilon), (abs(v.x) < epsilon),
@ -94,7 +94,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
struct compute_isCompNull<T, P, tvec4> struct compute_isCompNull<T, P, tvec4>
{ {
GLM_FUNC_QUALIFIER static tvec4<bool, P> call(tvec4<T, P> const & v, T const & epsilon) GLM_FUNC_QUALIFIER static tvec4<bool, P> call(tvec4<T, P> const & v, T const & epsilon) GLM_NOEXCEPT
{ {
return tvec4<bool, P>( return tvec4<bool, P>(
(abs(v.x) < epsilon), (abs(v.x) < epsilon),
@ -112,7 +112,7 @@ namespace detail
vecType<T, P> const & v0, vecType<T, P> const & v0,
vecType<T, P> const & v1, vecType<T, P> const & v1,
T const & epsilon T const & epsilon
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'areCollinear' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'areCollinear' only accept floating-point inputs");
@ -125,7 +125,7 @@ namespace detail
vecType<T, P> const & v0, vecType<T, P> const & v0,
vecType<T, P> const & v1, vecType<T, P> const & v1,
T const & epsilon T const & epsilon
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'areOrthogonal' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'areOrthogonal' only accept floating-point inputs");
@ -139,7 +139,7 @@ namespace detail
( (
vecType<T, P> const & v, vecType<T, P> const & v,
T const & epsilon T const & epsilon
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isNormalized' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isNormalized' only accept floating-point inputs");
@ -151,7 +151,7 @@ namespace detail
( (
vecType<T, P> const & v, vecType<T, P> const & v,
T const & epsilon T const & epsilon
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isNull' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isNull' only accept floating-point inputs");
@ -163,7 +163,7 @@ namespace detail
( (
vecType<T, P> const & v, vecType<T, P> const & v,
T const & epsilon T const & epsilon
) ) GLM_NOEXCEPT
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isCompNull' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isCompNull' only accept floating-point inputs");
@ -174,7 +174,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec2<bool, P> isCompNull GLM_FUNC_QUALIFIER tvec2<bool, P> isCompNull
( (
tvec2<T, P> const & v, tvec2<T, P> const & v,
T const & epsilon) T const & epsilon) GLM_NOEXCEPT
{ {
return tvec2<bool, P>( return tvec2<bool, P>(
abs(v.x) < epsilon, abs(v.x) < epsilon,
@ -186,7 +186,7 @@ namespace detail
( (
tvec3<T, P> const & v, tvec3<T, P> const & v,
T const & epsilon T const & epsilon
) ) GLM_NOEXCEPT
{ {
return tvec3<bool, P>( return tvec3<bool, P>(
abs(v.x) < epsilon, abs(v.x) < epsilon,
@ -199,7 +199,7 @@ namespace detail
( (
tvec4<T, P> const & v, tvec4<T, P> const & v,
T const & epsilon T const & epsilon
) ) GLM_NOEXCEPT
{ {
return tvec4<bool, P>( return tvec4<bool, P>(
abs(v.x) < epsilon, abs(v.x) < epsilon,
@ -214,7 +214,7 @@ namespace detail
vecType<T, P> const & v0, vecType<T, P> const & v0,
vecType<T, P> const & v1, vecType<T, P> const & v1,
T const & epsilon T const & epsilon
) ) GLM_NOEXCEPT
{ {
return isNormalized(v0, epsilon) && isNormalized(v1, epsilon) && (abs(dot(v0, v1)) <= epsilon); return isNormalized(v0, epsilon) && isNormalized(v1, epsilon) && (abs(dot(v0, v1)) <= epsilon);
} }

View File

@ -56,22 +56,22 @@ namespace glm
/// Simulate GL_CLAMP OpenGL wrap mode /// Simulate GL_CLAMP OpenGL wrap mode
/// @see gtx_wrap extension. /// @see gtx_wrap extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType clamp(genType const & Texcoord); GLM_FUNC_DECL genType clamp(genType const & Texcoord) GLM_NOEXCEPT;
/// Simulate GL_REPEAT OpenGL wrap mode /// Simulate GL_REPEAT OpenGL wrap mode
/// @see gtx_wrap extension. /// @see gtx_wrap extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType repeat(genType const & Texcoord); GLM_FUNC_DECL genType repeat(genType const & Texcoord) GLM_NOEXCEPT;
/// Simulate GL_MIRRORED_REPEAT OpenGL wrap mode /// Simulate GL_MIRRORED_REPEAT OpenGL wrap mode
/// @see gtx_wrap extension. /// @see gtx_wrap extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType mirrorClamp(genType const & Texcoord); GLM_FUNC_DECL genType mirrorClamp(genType const & Texcoord) GLM_NOEXCEPT;
/// Simulate GL_MIRROR_REPEAT OpenGL wrap mode /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode
/// @see gtx_wrap extension. /// @see gtx_wrap extension.
template <typename genType> template <typename genType>
GLM_FUNC_DECL genType mirrorRepeat(genType const & Texcoord); GLM_FUNC_DECL genType mirrorRepeat(genType const & Texcoord) GLM_NOEXCEPT;
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -33,13 +33,13 @@
namespace glm namespace glm
{ {
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType clamp(genType const & Texcoord) GLM_FUNC_QUALIFIER genType clamp(genType const & Texcoord) GLM_NOEXCEPT
{ {
return glm::clamp(Texcoord, genType(0), genType(1)); return glm::clamp(Texcoord, genType(0), genType(1));
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> clamp(tvec2<T, P> const & Texcoord) GLM_FUNC_QUALIFIER tvec2<T, P> clamp(tvec2<T, P> const & Texcoord) GLM_NOEXCEPT
{ {
tvec2<T, P> Result; tvec2<T, P> Result;
for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i) for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i)
@ -48,7 +48,7 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> clamp(tvec3<T, P> const & Texcoord) GLM_FUNC_QUALIFIER tvec3<T, P> clamp(tvec3<T, P> const & Texcoord) GLM_NOEXCEPT
{ {
tvec3<T, P> Result; tvec3<T, P> Result;
for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i) for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i)
@ -57,7 +57,7 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> clamp(tvec4<T, P> const & Texcoord) GLM_FUNC_QUALIFIER tvec4<T, P> clamp(tvec4<T, P> const & Texcoord) GLM_NOEXCEPT
{ {
tvec4<T, P> Result; tvec4<T, P> Result;
for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i) for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i)
@ -66,13 +66,13 @@ namespace glm
} }
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType repeat(genType const & Texcoord) GLM_FUNC_QUALIFIER genType repeat(genType const & Texcoord) GLM_NOEXCEPT
{ {
return glm::fract(Texcoord); return glm::fract(Texcoord);
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> repeat(tvec2<T, P> const & Texcoord) GLM_FUNC_QUALIFIER tvec2<T, P> repeat(tvec2<T, P> const & Texcoord) GLM_NOEXCEPT
{ {
tvec2<T, P> Result; tvec2<T, P> Result;
for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i) for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i)
@ -81,7 +81,7 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> repeat(tvec3<T, P> const & Texcoord) GLM_FUNC_QUALIFIER tvec3<T, P> repeat(tvec3<T, P> const & Texcoord) GLM_NOEXCEPT
{ {
tvec3<T, P> Result; tvec3<T, P> Result;
for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i) for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i)
@ -90,7 +90,7 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> repeat(tvec4<T, P> const & Texcoord) GLM_FUNC_QUALIFIER tvec4<T, P> repeat(tvec4<T, P> const & Texcoord) GLM_NOEXCEPT
{ {
tvec4<T, P> Result; tvec4<T, P> Result;
for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i) for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i)
@ -99,14 +99,14 @@ namespace glm
} }
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType mirrorClamp(genType const & Texcoord) GLM_FUNC_QUALIFIER genType mirrorClamp(genType const & Texcoord) GLM_NOEXCEPT
{ {
return glm::fract(glm::abs(Texcoord)); return glm::fract(glm::abs(Texcoord));
//return glm::mod(glm::abs(Texcoord), 1.0f); //return glm::mod(glm::abs(Texcoord), 1.0f);
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> mirrorClamp(tvec2<T, P> const & Texcoord) GLM_FUNC_QUALIFIER tvec2<T, P> mirrorClamp(tvec2<T, P> const & Texcoord) GLM_NOEXCEPT
{ {
tvec2<T, P> Result; tvec2<T, P> Result;
for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i) for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i)
@ -115,7 +115,7 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> mirrorClamp(tvec3<T, P> const & Texcoord) GLM_FUNC_QUALIFIER tvec3<T, P> mirrorClamp(tvec3<T, P> const & Texcoord) GLM_NOEXCEPT
{ {
tvec3<T, P> Result; tvec3<T, P> Result;
for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i) for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i)
@ -124,7 +124,7 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> mirrorClamp(tvec4<T, P> const & Texcoord) GLM_FUNC_QUALIFIER tvec4<T, P> mirrorClamp(tvec4<T, P> const & Texcoord) GLM_NOEXCEPT
{ {
tvec4<T, P> Result; tvec4<T, P> Result;
for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i) for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i)
@ -133,7 +133,7 @@ namespace glm
} }
template <typename genType> template <typename genType>
GLM_FUNC_QUALIFIER genType mirrorRepeat(genType const & Texcoord) GLM_FUNC_QUALIFIER genType mirrorRepeat(genType const & Texcoord) GLM_NOEXCEPT
{ {
genType const Abs = glm::abs(Texcoord); genType const Abs = glm::abs(Texcoord);
genType const Clamp = genType(int(glm::floor(Abs)) % 2); genType const Clamp = genType(int(glm::floor(Abs)) % 2);
@ -150,7 +150,7 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> mirrorRepeat(tvec2<T, P> const & Texcoord) GLM_FUNC_QUALIFIER tvec2<T, P> mirrorRepeat(tvec2<T, P> const & Texcoord) GLM_NOEXCEPT
{ {
tvec2<T, P> Result; tvec2<T, P> Result;
for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i) for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i)
@ -159,7 +159,7 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> mirrorRepeat(tvec3<T, P> const & Texcoord) GLM_FUNC_QUALIFIER tvec3<T, P> mirrorRepeat(tvec3<T, P> const & Texcoord) GLM_NOEXCEPT
{ {
tvec3<T, P> Result; tvec3<T, P> Result;
for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i) for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i)
@ -168,7 +168,7 @@ namespace glm
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> mirrorRepeat(tvec4<T, P> const & Texcoord) GLM_FUNC_QUALIFIER tvec4<T, P> mirrorRepeat(tvec4<T, P> const & Texcoord) GLM_NOEXCEPT
{ {
tvec4<T, P> Result; tvec4<T, P> Result;
for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i) for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i)