Fix math::smooth(er)step in case the type isn't implicitly constructible from integers
This commit is contained in:
parent
905e98070c
commit
2cce0082cf
1 changed files with 2 additions and 2 deletions
|
|
@ -216,13 +216,13 @@ namespace psemek::math
|
|||
template <typename T>
|
||||
T smoothstep(T x)
|
||||
{
|
||||
return x * x * (3 - 2 * x);
|
||||
return x * x * (T{3} - T{2} * x);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T smootherstep(T x)
|
||||
{
|
||||
return x * x * x * (10 - x * (15 - 6 * x));
|
||||
return x * x * x * (T{10} - x * (T{15} - T{6} * x));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue