/// Builds a rotation 4 * 4 matrix created from an axis vector and an angle expressed in degrees.
/// @see - gtc_matrix_transform
/// @see - gtx_transform:
/// - @link glm::gtx::rotate(T angle, T x, T y, T z) rotate(T const & angle, T const & x, T const & y, T const & z) @endlink
/// - @link glm::gtx::rotate(detail::tmat4x4<T> const & m, T angle, T x, T y, T z) rotate(mat4x4<T> const & m, T const & angle, T const & x, T const & y, T const & z) @endlink
/// - @link rotate(T angle, T x, T y, T z) rotate(T const & angle, T const & x, T const & y, T const & z) @endlink
/// - @link rotate(detail::tmat4x4<T> const & m, T angle, T x, T y, T z) rotate(mat4x4<T> const & m, T const & angle, T const & x, T const & y, T const & z) @endlink
/// Builds a scale 4 * 4 matrix created from 3 scalars.
/// @see - gtc_matrix_transform
/// @see - gtx_transform:
/// - @link glm::gtx::scale(T x, T y, T z) scale(T const & x, T const & y, T const & z) @endlink
/// - @link glm::gtx::scale(detail::tmat4x4<T> const & m, T x, T y, T z) scale(mat4x4<T> const & m, T const & angle, T const & x, T const & y, T const & z) @endlink
/// - @link scale(T x, T y, T z) scale(T const & x, T const & y, T const & z) @endlink
/// - @link scale(detail::tmat4x4<T> const & m, T x, T y, T z) scale(mat4x4<T> const & m, T const & angle, T const & x, T const & y, T const & z) @endlink
template<typenameT>gtc::uint32u32_rgbx_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint32u32_xrgb_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint32u32_bgrx_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint32u32_xbgr_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint32u32_rgbx_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint32u32_xrgb_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint32u32_bgrx_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint32u32_xbgr_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint32u32_rgba_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint32u32_argb_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint32u32_bgra_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint32u32_abgr_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint32u32_rgba_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint32u32_argb_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint32u32_bgra_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint32u32_abgr_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint64u64_rgbx_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint64u64_xrgb_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint64u64_bgrx_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint64u64_xbgr_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint64u64_rgbx_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint64u64_xrgb_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint64u64_bgrx_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint64u64_xbgr_cast(constdetail::tvec3<T>&c);//!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint64u64_rgba_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint64u64_argb_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint64u64_bgra_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::uint64u64_abgr_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint64u64_rgba_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint64u64_argb_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint64u64_bgra_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>uint64u64_abgr_cast(constdetail::tvec4<T>&c);//!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension)
template<typenameT>gtx::f16vec1f16_channel_cast(Ta);//!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
template<typenameT>f16f16_channel_cast(Ta);//!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f16vec3f16_rgbx_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f16vec3f16_xrgb_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f16vec3f16_bgrx_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f16vec3f16_xbgr_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f16vec3f16_rgbx_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f16vec3f16_xrgb_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f16vec3f16_bgrx_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f16vec3f16_xbgr_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f16vec4f16_rgba_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f16vec4f16_argb_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f16vec4f16_bgra_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f16vec4f16_abgr_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f16vec4f16_rgba_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f16vec4f16_argb_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f16vec4f16_bgra_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f16vec4f16_abgr_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtx::f32vec1f32_channel_cast(Ta);//!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
template<typenameT>f32f32_channel_cast(Ta);//!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f32vec3f32_rgbx_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f32vec3f32_xrgb_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f32vec3f32_bgrx_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f32vec3f32_xbgr_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f32vec3f32_rgbx_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f32vec3f32_xrgb_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f32vec3f32_bgrx_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f32vec3f32_xbgr_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f32vec4f32_rgba_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f32vec4f32_argb_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f32vec4f32_bgra_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f32vec4f32_abgr_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f32vec4f32_rgba_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f32vec4f32_argb_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f32vec4f32_bgra_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f32vec4f32_abgr_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtx::f64vec1f64_channel_cast(Ta);//!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
template<typenameT>f64f64_channel_cast(Ta);//!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f64vec3f64_rgbx_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f64vec3f64_xrgb_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f64vec3f64_bgrx_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f64vec3f64_xbgr_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f64vec3f64_rgbx_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f64vec3f64_xrgb_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f64vec3f64_bgrx_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f64vec3f64_xbgr_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f64vec4f64_rgba_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f64vec4f64_argb_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f64vec4f64_bgra_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>gtc::f64vec4f64_abgr_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f64vec4f64_rgba_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f64vec4f64_argb_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f64vec4f64_bgra_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
template<typenameT>f64vec4f64_abgr_cast(Tc);//!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension)
return x - ((x * x * x) / T(6)) + ((x * x * x * x * x) / T(120)) - ((x * x * x * x * x * x * x) / T(5040));
}
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec2<T> fastSin(
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec2<T> fastSin(
const detail::tvec2<T>& x)
{
{
return detail::tvec2<T>(
fastSin(x.x),
fastSin(x.y));
}
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> fastSin(
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> fastSin(
const detail::tvec3<T>& x)
{
{
return detail::tvec3<T>(
fastSin(x.x),
fastSin(x.y),
fastSin(x.z));
}
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec4<T> fastSin(
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec4<T> fastSin(
const detail::tvec4<T>& x)
{
{
return detail::tvec4<T>(
fastSin(x.x),
fastSin(x.y),
fastSin(x.z),
fastSin(x.w));
}
}
// cos
template <typename T>
GLM_FUNC_QUALIFIER T fastCos(const T x)
{
// cos
template <typename T>
GLM_FUNC_QUALIFIER T fastCos(const T x)
{
return T(1) - (x * x * T(0.5)) + (x * x * x * x * T(0.041666666666)) - (x * x * x * x * x * x * T(0.00138888888888));
}
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec2<T> fastCos(
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec2<T> fastCos(
const detail::tvec2<T>& x)
{
{
return detail::tvec2<T>(
fastCos(x.x),
fastCos(x.y));
}
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> fastCos(
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> fastCos(
const detail::tvec3<T>& x)
{
{
return detail::tvec3<T>(
fastCos(x.x),
fastCos(x.y),
fastCos(x.z));
}
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec4<T> fastCos(
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec4<T> fastCos(
const detail::tvec4<T>& x)
{
{
return detail::tvec4<T>(
fastCos(x.x),
fastCos(x.y),
fastCos(x.z),
fastCos(x.w));
}
}
// tan
template <typename T>
GLM_FUNC_QUALIFIER T fastTan(const T x)
{
// tan
template <typename T>
GLM_FUNC_QUALIFIER T fastTan(const T x)
{
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>
GLM_FUNC_QUALIFIER detail::tvec2<T> fastTan(
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec2<T> fastTan(
const detail::tvec2<T>& x)
{
{
return detail::tvec2<T>(
fastTan(x.x),
fastTan(x.y));
}
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> fastTan(
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> fastTan(
const detail::tvec3<T>& x)
{
{
return detail::tvec3<T>(
fastTan(x.x),
fastTan(x.y),
fastTan(x.z));
}
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec4<T> fastTan(
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec4<T> fastTan(
const detail::tvec4<T>& x)
{
{
return detail::tvec4<T>(
fastTan(x.x),
fastTan(x.y),
fastTan(x.z),
fastTan(x.w));
}
}
// asin
template <typename T>
GLM_FUNC_QUALIFIER T fastAsin(const T x)
{
// asin
template <typename T>
GLM_FUNC_QUALIFIER T fastAsin(const T x)
{
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));
GLM_FUNC_QUALIFIER T fastAtan(const T y, const T x)
{
// atan
template <typename T>
GLM_FUNC_QUALIFIER T fastAtan(const T y, const T x)
{
T sgn = sign(y) * sign(x);
return abs(fastAtan(y / x)) * sgn;
}
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec2<T> fastAtan(
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec2<T> fastAtan(
const detail::tvec2<T>& y,
const detail::tvec2<T>& x)
{
{
return detail::tvec2<T>(
fastAtan(y.x, x.x),
fastAtan(y.y, x.y));
}
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> fastAtan(
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> fastAtan(
const detail::tvec3<T>& y,
const detail::tvec3<T>& x)
{
{
return detail::tvec3<T>(
fastAtan(y.x, x.x),
fastAtan(y.y, x.y),
fastAtan(y.z, x.z));
}
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec4<T> fastAtan(
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec4<T> fastAtan(
const detail::tvec4<T>& y,
const detail::tvec4<T>& x)
{
{
return detail::tvec4<T>(
fastAtan(y.x, x.x),
fastAtan(y.y, x.y),
fastAtan(y.z, x.z),
fastAtan(y.w, x.w));
}
}
template <typename T>
GLM_FUNC_QUALIFIER T fastAtan(const T x)
{
template <typename T>
GLM_FUNC_QUALIFIER T fastAtan(const T x)
{
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));