Skip to content

Commit cbfc22c

Browse files
authored
Fix typo in step intrinsic comment (#153642)
`y` should be the first argument and `x` should be the second, otherwise the formula is wrong. This also matches the documentation [here](https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-step).
1 parent 016c301 commit cbfc22c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/Headers/hlsl/hlsl_alias_intrinsics.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,10 +2190,10 @@ float4 sqrt(float4);
21902190
// step builtins
21912191
//===----------------------------------------------------------------------===//
21922192

2193-
/// \fn T step(T x, T y)
2193+
/// \fn T step(T y, T x)
21942194
/// \brief Returns 1 if the x parameter is greater than or equal to the y
2195-
/// parameter; otherwise, 0. vector. \param x [in] The first floating-point
2196-
/// value to compare. \param y [in] The first floating-point value to compare.
2195+
/// parameter; otherwise, 0. vector. \param y [in] The first floating-point
2196+
/// value to compare. \param x [in] The second floating-point value to compare.
21972197
///
21982198
/// Step is based on the following formula: (x >= y) ? 1 : 0
21992199

0 commit comments

Comments
 (0)