Merge branch '0.9.1' into gtx_ulp

This commit is contained in:
Christophe Riccio
2011-04-21 10:46:15 +01:00
5 changed files with 67 additions and 18 deletions

View File

@@ -1402,18 +1402,6 @@ namespace glm
return fi.f;
}
inline float intBitsToFloat(uint const & value)
{
union
{
float f;
uint u;
} fu;
fu.u = value;
return fu.f;
}
template <typename T>
inline detail::tvec2<float> intBitsToFloat
(
@@ -1447,6 +1435,51 @@ namespace glm
intBitsToFloat(value.y));
}
inline float uintBitsToFloat(uint const & value)
{
union
{
float f;
uint u;
} fu;
fu.u = value;
return fu.f;
}
template <typename T>
inline detail::tvec2<float> uintBitsToFloat
(
detail::tvec2<T> const & value
)
{
return detail::tvec2<T>(
uintBitsToFloat(value.x),
uintBitsToFloat(value.y));
}
template <typename T>
inline detail::tvec3<float> uintBitsToFloat
(
detail::tvec3<T> const & value
)
{
return detail::tvec3<T>(
uintBitsToFloat(value.x),
uintBitsToFloat(value.y));
}
template <typename T>
inline detail::tvec4<float> uintBitsToFloat
(
detail::tvec4<T> const & value
)
{
return detail::tvec4<T>(
uintBitsToFloat(value.x),
uintBitsToFloat(value.y));
}
template <typename genType>
inline genType fma
(

View File

@@ -121,7 +121,7 @@ namespace glm
detail::tvec3<valType> axis(
detail::tquat<valType> const & x);
//! Build a quaternion from an angle and an axis.
//! Build a quaternion from an angle and a normalized axis.
//! From GLM_GTX_quaternion extension.
template <typename valType>
detail::tquat<valType> angleAxis(
@@ -130,12 +130,12 @@ namespace glm
valType const & y,
valType const & z);
//! Build a quaternion from an angle and an axis.
//! Build a quaternion from an angle and a normalized axis.
//! From GLM_GTX_quaternion extension.
template <typename valType>
detail::tquat<valType> angleAxis(
valType const & angle,
detail::tvec3<valType> const & v);
detail::tvec3<valType> const & axis);
//! Extract the real component of a quaternion.
//! From GLM_GTX_quaternion extension.

View File

@@ -185,7 +185,6 @@ namespace quaternion
)
{
detail::tquat<valType> result;
detail::tvec3<valType> v_normalized = glm::normalize(v);
valType a = glm::radians(angle);
valType s = glm::sin(a * valType(0.5));