Skip to content

Commit 286457d

Browse files
author
devsh
committed
first typo-bug fixed
1 parent 29de22a commit 286457d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/nbl/builtin/hlsl/cpp_compat/intrinsics.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ inline T lerp(const T& x, const T& y, const U& a)
8484
{
8585
T retval;
8686
// whatever has a `scalar_type` specialization should be a pure vector
87-
for (auto i=0; i<sizeof(T)/sizeof(retval); i++)
88-
retval[i] = a[i] ? y[i] : x[i];
87+
for (auto i=0; i<sizeof(a)/sizeof(scalar_type_t<U>); i++)
88+
retval[i] = a[i] ? y[i]:x[i];
8989
return retval;
9090
}
9191
else

0 commit comments

Comments
 (0)