mirror of
https://github.com/g-truc/glm.git
synced 2024-11-12 21:31:47 +00:00
commit
1a2d6cba99
@ -259,7 +259,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& edge0, vec<L, T, Q> const& edge1, vec<L, T, Q> const& x)
|
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& edge0, vec<L, T, Q> const& edge1, vec<L, T, Q> const& x)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'step' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'smoothstep' only accept floating-point inputs");
|
||||||
vec<L, T, Q> const tmp(clamp((x - edge0) / (edge1 - edge0), static_cast<T>(0), static_cast<T>(1)));
|
vec<L, T, Q> const tmp(clamp((x - edge0) / (edge1 - edge0), static_cast<T>(0), static_cast<T>(1)));
|
||||||
return tmp * tmp * (static_cast<T>(3) - static_cast<T>(2) * tmp);
|
return tmp * tmp * (static_cast<T>(3) - static_cast<T>(2) * tmp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user