mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Resolved issue #24, incorrect assert messages for step and smoothstep
This commit is contained in:
parent
560b474008
commit
82832839c2
@ -615,7 +615,7 @@ namespace detail
|
|||||||
genType const & x
|
genType const & x
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'mix' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'step' only accept floating-point inputs");
|
||||||
|
|
||||||
return x < edge ? genType(0) : genType(1);
|
return x < edge ? genType(0) : genType(1);
|
||||||
}
|
}
|
||||||
@ -707,7 +707,7 @@ namespace detail
|
|||||||
genType const & x
|
genType const & x
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'mix' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'smoothstep' only accept floating-point inputs");
|
||||||
|
|
||||||
genType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1));
|
genType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1));
|
||||||
return tmp * tmp * (genType(3) - genType(2) * tmp);
|
return tmp * tmp * (genType(3) - genType(2) * tmp);
|
||||||
|
Loading…
Reference in New Issue
Block a user