35 GLM_FUNC_QUALIFIER T mod289(T
const & x)
37 return x -
floor(x * static_cast<T>(1.0) / static_cast<T>(289.0)) *
static_cast<T
>(289.0);
41 GLM_FUNC_QUALIFIER T permute(T
const & x)
43 return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
46 template <
typename T, precision P>
47 GLM_FUNC_QUALIFIER tvec2<T, P> permute(tvec2<T, P>
const & x)
49 return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
52 template <
typename T, precision P>
53 GLM_FUNC_QUALIFIER tvec3<T, P> permute(tvec3<T, P>
const & x)
55 return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
58 template <
typename T, precision P>
59 GLM_FUNC_QUALIFIER tvec4<T, P> permute(tvec4<T, P>
const & x)
61 return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
71 GLM_FUNC_QUALIFIER T taylorInvSqrt(T
const & r)
73 return T(1.79284291400159) - T(0.85373472095314) * r;
76 template <
typename T, precision P>
77 GLM_FUNC_QUALIFIER tvec2<T, P> taylorInvSqrt(tvec2<T, P>
const & r)
79 return T(1.79284291400159) - T(0.85373472095314) * r;
82 template <
typename T, precision P>
83 GLM_FUNC_QUALIFIER tvec3<T, P> taylorInvSqrt(tvec3<T, P>
const & r)
85 return T(1.79284291400159) - T(0.85373472095314) * r;
88 template <
typename T, precision P>
89 GLM_FUNC_QUALIFIER tvec4<T, P> taylorInvSqrt(tvec4<T, P>
const & r)
91 return T(1.79284291400159) - T(0.85373472095314) * r;
101 template <
typename T, precision P>
102 GLM_FUNC_QUALIFIER tvec2<T, P> fade(tvec2<T, P>
const & t)
104 return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
107 template <
typename T, precision P>
108 GLM_FUNC_QUALIFIER tvec3<T, P> fade(tvec3<T, P>
const & t)
110 return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
113 template <
typename T, precision P>
114 GLM_FUNC_QUALIFIER tvec4<T, P> fade(tvec4<T, P>
const & t)
116 return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
GLM_FUNC_DECL vecType< T, P > floor(vecType< T, P > const &x)
Returns a value equal to the nearest integer that is less then or equal to x.