Merge branch '0.9.2' into 0.9.3
This commit is contained in:
commit
fc8a5d4c0a
@ -149,13 +149,10 @@
|
|||||||
// G++
|
// G++
|
||||||
#elif defined(__GNUC__) || defined(__llvm__) || defined(__clang__)
|
#elif defined(__GNUC__) || defined(__llvm__) || defined(__clang__)
|
||||||
# if defined (__llvm__)
|
# if defined (__llvm__)
|
||||||
# pragma message("LLVM")
|
|
||||||
# define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_LLVM
|
# define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_LLVM
|
||||||
# elif defined (__clang__)
|
# elif defined (__clang__)
|
||||||
# pragma message("CLANG")
|
|
||||||
# define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_CLANG
|
# define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_CLANG
|
||||||
# else
|
# else
|
||||||
# pragma message("GCC")
|
|
||||||
# define GLM_COMPILER_GCC_EXTRA 0
|
# define GLM_COMPILER_GCC_EXTRA 0
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
|
@ -80,6 +80,11 @@ namespace detail
|
|||||||
detail::tquat<T> operator- (
|
detail::tquat<T> operator- (
|
||||||
detail::tquat<T> const & q);
|
detail::tquat<T> const & q);
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
detail::tquat<T> operator+ (
|
||||||
|
detail::tquat<T> const & q,
|
||||||
|
detail::tquat<T> const & p);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tquat<T> operator* (
|
detail::tquat<T> operator* (
|
||||||
detail::tquat<T> const & q,
|
detail::tquat<T> const & q,
|
||||||
@ -160,7 +165,7 @@ namespace quaternion ///< GLM_GTC_quaternion extension: Quaternion types and fun
|
|||||||
detail::tquat<T> mix(
|
detail::tquat<T> mix(
|
||||||
detail::tquat<T> const & x,
|
detail::tquat<T> const & x,
|
||||||
detail::tquat<T> const & y,
|
detail::tquat<T> const & y,
|
||||||
typename detail::tquat<T>::value_type const & a);
|
T const & a);
|
||||||
|
|
||||||
//! Returns the q conjugate.
|
//! Returns the q conjugate.
|
||||||
//! From GLM_GTC_quaternion extension.
|
//! From GLM_GTC_quaternion extension.
|
||||||
|
@ -156,6 +156,20 @@ namespace detail{
|
|||||||
return detail::tquat<T>(-q.w, -q.x, -q.y, -q.z);
|
return detail::tquat<T>(-q.w, -q.x, -q.y, -q.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
GLM_FUNC_QUALIFIER detail::tquat<T> operator+
|
||||||
|
(
|
||||||
|
detail::tquat<T> const & q,
|
||||||
|
detail::tquat<T> const & p
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return detail::tquat<T>(
|
||||||
|
q.w + p.w,
|
||||||
|
q.x + p.x,
|
||||||
|
q.y + p.y,
|
||||||
|
q.z + p.z);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER detail::tquat<T> operator*
|
GLM_FUNC_QUALIFIER detail::tquat<T> operator*
|
||||||
(
|
(
|
||||||
|
@ -49,9 +49,10 @@ namespace integer
|
|||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType factorial(genType const & x)
|
GLM_FUNC_QUALIFIER genType factorial(genType const & x)
|
||||||
{
|
{
|
||||||
|
genType Temp = x;
|
||||||
genType Result;
|
genType Result;
|
||||||
for(Result = 1; x > 1; --x)
|
for(Result = 1; Temp > 1; --Temp)
|
||||||
Result *= x;
|
Result *= Temp;
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ int test_quat_slerp()
|
|||||||
glm::quat B(90.0f, glm::vec3(0, 0, 1));
|
glm::quat B(90.0f, glm::vec3(0, 0, 1));
|
||||||
glm::quat C = glm::mix(A, B, 0.5f);
|
glm::quat C = glm::mix(A, B, 0.5f);
|
||||||
|
|
||||||
Error += C != glm::quat(45.f, glm::vec3(0, 0, 1)) ? 0 : 1;
|
Error += C == glm::quat(45.f, glm::vec3(0, 0, 1)) ? 0 : 1;
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user