|
|
|
@ -26,6 +26,8 @@ |
|
|
|
|
/// @author Christophe Riccio |
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////// |
|
|
|
|
|
|
|
|
|
#include "_vectorize.hpp" |
|
|
|
|
|
|
|
|
|
namespace glm |
|
|
|
|
{ |
|
|
|
|
// radians |
|
|
|
@ -37,46 +39,12 @@ namespace glm |
|
|
|
|
{ |
|
|
|
|
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'radians' only accept floating-point input"); |
|
|
|
|
|
|
|
|
|
const genType pi = genType(3.1415926535897932384626433832795); |
|
|
|
|
genType const pi = genType(3.1415926535897932384626433832795); |
|
|
|
|
return degrees * (pi / genType(180)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> radians |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & degrees |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
radians(degrees.x), |
|
|
|
|
radians(degrees.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> radians |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & degrees |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
radians(degrees.x), |
|
|
|
|
radians(degrees.y), |
|
|
|
|
radians(degrees.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> radians |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & degrees |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
radians(degrees.x), |
|
|
|
|
radians(degrees.y), |
|
|
|
|
radians(degrees.z), |
|
|
|
|
radians(degrees.w)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
VECTORIZE_VEC(radians) |
|
|
|
|
|
|
|
|
|
// degrees |
|
|
|
|
template <typename genType> |
|
|
|
|
GLM_FUNC_QUALIFIER genType degrees |
|
|
|
@ -90,41 +58,7 @@ namespace glm |
|
|
|
|
return radians * (genType(180) / pi); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> degrees |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & radians |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
degrees(radians.x), |
|
|
|
|
degrees(radians.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> degrees |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & radians |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
degrees(radians.x), |
|
|
|
|
degrees(radians.y), |
|
|
|
|
degrees(radians.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> degrees |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & radians |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
degrees(radians.x), |
|
|
|
|
degrees(radians.y), |
|
|
|
|
degrees(radians.z), |
|
|
|
|
degrees(radians.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(degrees) |
|
|
|
|
|
|
|
|
|
// sin |
|
|
|
|
template <typename genType> |
|
|
|
@ -138,41 +72,7 @@ namespace glm |
|
|
|
|
return ::std::sin(angle); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> sin |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
sin(angle.x), |
|
|
|
|
sin(angle.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> sin |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
sin(angle.x), |
|
|
|
|
sin(angle.y), |
|
|
|
|
sin(angle.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> sin |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
sin(angle.x), |
|
|
|
|
sin(angle.y), |
|
|
|
|
sin(angle.z), |
|
|
|
|
sin(angle.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(sin) |
|
|
|
|
|
|
|
|
|
// cos |
|
|
|
|
template <typename genType> |
|
|
|
@ -183,41 +83,7 @@ namespace glm |
|
|
|
|
return ::std::cos(angle); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> cos |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
cos(angle.x), |
|
|
|
|
cos(angle.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> cos |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
cos(angle.x), |
|
|
|
|
cos(angle.y), |
|
|
|
|
cos(angle.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> cos |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
cos(angle.x), |
|
|
|
|
cos(angle.y), |
|
|
|
|
cos(angle.z), |
|
|
|
|
cos(angle.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(cos) |
|
|
|
|
|
|
|
|
|
// tan |
|
|
|
|
template <typename genType> |
|
|
|
@ -231,41 +97,7 @@ namespace glm |
|
|
|
|
return ::std::tan(angle); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> tan |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
tan(angle.x), |
|
|
|
|
tan(angle.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> tan |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
tan(angle.x), |
|
|
|
|
tan(angle.y), |
|
|
|
|
tan(angle.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> tan |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
tan(angle.x), |
|
|
|
|
tan(angle.y), |
|
|
|
|
tan(angle.z), |
|
|
|
|
tan(angle.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(tan) |
|
|
|
|
|
|
|
|
|
// asin |
|
|
|
|
template <typename genType> |
|
|
|
@ -279,41 +111,7 @@ namespace glm |
|
|
|
|
return ::std::asin(x); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> asin |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
asin(x.x), |
|
|
|
|
asin(x.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> asin |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
asin(x.x), |
|
|
|
|
asin(x.y), |
|
|
|
|
asin(x.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> asin |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
asin(x.x), |
|
|
|
|
asin(x.y), |
|
|
|
|
asin(x.z), |
|
|
|
|
asin(x.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(asin) |
|
|
|
|
|
|
|
|
|
// acos |
|
|
|
|
template <typename genType> |
|
|
|
@ -327,41 +125,7 @@ namespace glm |
|
|
|
|
return ::std::acos(x); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> acos |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
acos(x.x), |
|
|
|
|
acos(x.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> acos |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
acos(x.x), |
|
|
|
|
acos(x.y), |
|
|
|
|
acos(x.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> acos |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
acos(x.x), |
|
|
|
|
acos(x.y), |
|
|
|
|
acos(x.z), |
|
|
|
|
acos(x.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(acos) |
|
|
|
|
|
|
|
|
|
// atan |
|
|
|
|
template <typename genType> |
|
|
|
@ -376,44 +140,7 @@ namespace glm |
|
|
|
|
return ::std::atan2(y, x); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> atan |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & y, |
|
|
|
|
detail::tvec2<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
atan(y.x, x.x), |
|
|
|
|
atan(y.y, x.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> atan |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & y, |
|
|
|
|
detail::tvec3<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
atan(y.x, x.x), |
|
|
|
|
atan(y.y, x.y), |
|
|
|
|
atan(y.z, x.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> atan |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & y, |
|
|
|
|
detail::tvec4<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
atan(y.x, x.x), |
|
|
|
|
atan(y.y, x.y), |
|
|
|
|
atan(y.z, x.z), |
|
|
|
|
atan(y.w, x.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC_VEC(atan) |
|
|
|
|
|
|
|
|
|
template <typename genType> |
|
|
|
|
GLM_FUNC_QUALIFIER genType atan |
|
|
|
@ -426,41 +153,7 @@ namespace glm |
|
|
|
|
return ::std::atan(x); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> atan |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
atan(x.x), |
|
|
|
|
atan(x.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> atan |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
atan(x.x), |
|
|
|
|
atan(x.y), |
|
|
|
|
atan(x.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> atan |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
atan(x.x), |
|
|
|
|
atan(x.y), |
|
|
|
|
atan(x.z), |
|
|
|
|
atan(x.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(atan) |
|
|
|
|
|
|
|
|
|
// sinh |
|
|
|
|
template <typename genType> |
|
|
|
@ -474,41 +167,7 @@ namespace glm |
|
|
|
|
return std::sinh(angle); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> sinh |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
sinh(angle.x), |
|
|
|
|
sinh(angle.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> sinh |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
sinh(angle.x), |
|
|
|
|
sinh(angle.y), |
|
|
|
|
sinh(angle.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> sinh |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
sinh(angle.x), |
|
|
|
|
sinh(angle.y), |
|
|
|
|
sinh(angle.z), |
|
|
|
|
sinh(angle.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(sinh) |
|
|
|
|
|
|
|
|
|
// cosh |
|
|
|
|
template <typename genType> |
|
|
|
@ -522,41 +181,7 @@ namespace glm |
|
|
|
|
return std::cosh(angle); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> cosh |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
cosh(angle.x), |
|
|
|
|
cosh(angle.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> cosh |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
cosh(angle.x), |
|
|
|
|
cosh(angle.y), |
|
|
|
|
cosh(angle.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> cosh |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
cosh(angle.x), |
|
|
|
|
cosh(angle.y), |
|
|
|
|
cosh(angle.z), |
|
|
|
|
cosh(angle.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(cosh) |
|
|
|
|
|
|
|
|
|
// tanh |
|
|
|
|
template <typename genType> |
|
|
|
@ -570,41 +195,7 @@ namespace glm |
|
|
|
|
return std::tanh(angle); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> tanh |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
tanh(angle.x), |
|
|
|
|
tanh(angle.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> tanh |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
tanh(angle.x), |
|
|
|
|
tanh(angle.y), |
|
|
|
|
tanh(angle.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> tanh |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & angle |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
tanh(angle.x), |
|
|
|
|
tanh(angle.y), |
|
|
|
|
tanh(angle.z), |
|
|
|
|
tanh(angle.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(tanh) |
|
|
|
|
|
|
|
|
|
// asinh |
|
|
|
|
template <typename genType> |
|
|
|
@ -618,41 +209,7 @@ namespace glm |
|
|
|
|
return (x < genType(0) ? genType(-1) : (x > genType(0) ? genType(1) : genType(0))) * log(abs(x) + sqrt(genType(1) + x * x)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> asinh |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
asinh(x.x), |
|
|
|
|
asinh(x.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> asinh |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
asinh(x.x), |
|
|
|
|
asinh(x.y), |
|
|
|
|
asinh(x.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> asinh |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
asinh(x.x), |
|
|
|
|
asinh(x.y), |
|
|
|
|
asinh(x.z), |
|
|
|
|
asinh(x.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(asinh) |
|
|
|
|
|
|
|
|
|
// acosh |
|
|
|
|
template <typename genType> |
|
|
|
@ -668,41 +225,7 @@ namespace glm |
|
|
|
|
return log(x + sqrt(x * x - genType(1))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> acosh |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
acosh(x.x), |
|
|
|
|
acosh(x.y)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> acosh |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
acosh(x.x), |
|
|
|
|
acosh(x.y), |
|
|
|
|
acosh(x.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> acosh |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
acosh(x.x), |
|
|
|
|
acosh(x.y), |
|
|
|
|
acosh(x.z), |
|
|
|
|
acosh(x.w)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(acosh) |
|
|
|
|
|
|
|
|
|
// atanh |
|
|
|
|
template <typename genType> |
|
|
|
@ -718,39 +241,6 @@ namespace glm |
|
|
|
|
return genType(0.5) * log((genType(1) + x) / (genType(1) - x)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec2<T> atanh |
|
|
|
|
( |
|
|
|
|
detail::tvec2<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec2<T>( |
|
|
|
|
atanh(x.x), |
|
|
|
|
atanh(x.y)); |
|
|
|
|
} |
|
|
|
|
VECTORIZE_VEC(atanh) |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec3<T> atanh |
|
|
|
|
( |
|
|
|
|
detail::tvec3<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec3<T>( |
|
|
|
|
atanh(x.x), |
|
|
|
|
atanh(x.y), |
|
|
|
|
atanh(x.z)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
|
GLM_FUNC_QUALIFIER detail::tvec4<T> atanh |
|
|
|
|
( |
|
|
|
|
detail::tvec4<T> const & x |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
return detail::tvec4<T>( |
|
|
|
|
atanh(x.x), |
|
|
|
|
atanh(x.y), |
|
|
|
|
atanh(x.z), |
|
|
|
|
atanh(x.w)); |
|
|
|
|
} |
|
|
|
|
}//namespace glm |
|
|
|
|