diff options
| -rw-r--r-- | source/slang/hlsl.meta.slang | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang index 434a8245a..9de14ad96 100644 --- a/source/slang/hlsl.meta.slang +++ b/source/slang/hlsl.meta.slang @@ -1781,6 +1781,13 @@ T distance(vector<T, N> x, vector<T, N> y) return length(x - y); } +__generic<T : __BuiltinFloatingPointType> +[__readNone] +T distance(T x, T y) +{ + return length(x - y); +} + // Vector dot product __generic<T : __BuiltinFloatingPointType, let N : int> |
