Add new HLSL >, >=, <, <=, ==, !=, % operators
このコミットが含まれているのは:
1 親
ebf906c062
コミット
34afa9a37d
37ファイル変更
+5656
-12
検索条件に一致するファイルはありません
@@ -8,6 +8,7 @@ using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServic
|
||||
#endif
|
||||
|
||||
#nullable enable
|
||||
#pragma warning disable CS0660, CS0661
|
||||
|
||||
namespace ComputeSharp;
|
||||
|
||||
@@ -1518,6 +1519,7 @@ public unsafe partial struct Int3
|
||||
/// Negates a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyz">The <see cref="Int3"/> value to negate.</param>
|
||||
/// <returns>The negated value of <paramref name="xyz"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3 operator -(Int3 xyz) => default;
|
||||
|
||||
@@ -1526,6 +1528,7 @@ public unsafe partial struct Int3
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Int3"/> value to sum.</param>
|
||||
/// <param name="right">The second <see cref="Int3"/> value to sum.</param>
|
||||
/// <returns>The result of adding <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3 operator +(Int3 left, Int3 right) => default;
|
||||
|
||||
@@ -1534,14 +1537,25 @@ public unsafe partial struct Int3
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Int3"/> value to divide.</param>
|
||||
/// <param name="right">The second <see cref="Int3"/> value to divide.</param>
|
||||
/// <returns>The result of dividing <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3 operator /(Int3 left, Int3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the remainder of the division between two <see cref="Int3"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Int3"/> value to divide.</param>
|
||||
/// <param name="right">The second <see cref="Int3"/> value to divide.</param>
|
||||
/// <returns>The remainder of dividing <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3 operator %(Int3 left, Int3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two <see cref="Int3"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Int3"/> value to multiply.</param>
|
||||
/// <param name="right">The second <see cref="Int3"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3 operator *(Int3 left, Int3 right) => default;
|
||||
|
||||
@@ -1550,6 +1564,61 @@ public unsafe partial struct Int3
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Int3"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Int3"/> value to subtract.</param>
|
||||
/// <returns>The result of subtracting <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3 operator -(Int3 left, Int3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Compares two <see cref="Int3"/> values to see if the first is greater than the second.
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Int3"/> value to compare.</param>
|
||||
/// <param name="right">The second <see cref="Int3"/> value to compare.</param>
|
||||
/// <returns>The result of comparing <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Bool3 operator >(Int3 left, Int3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Compares two <see cref="Int3"/> values to see if the first is greater than or equal to the second.
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Int3"/> value to compare.</param>
|
||||
/// <param name="right">The second <see cref="Int3"/> value to compare.</param>
|
||||
/// <returns>The result of comparing <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Bool3 operator >=(Int3 left, Int3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Compares two <see cref="Int3"/> values to see if the first is lower than the second.
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Int3"/> value to compare.</param>
|
||||
/// <param name="right">The second <see cref="Int3"/> value to compare.</param>
|
||||
/// <returns>The result of comparing <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Bool3 operator <(Int3 left, Int3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Compares two <see cref="Int3"/> values to see if the first is lower than or equal to the second.
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Int3"/> value to compare.</param>
|
||||
/// <param name="right">The second <see cref="Int3"/> value to compare.</param>
|
||||
/// <returns>The result of comparing <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Bool3 operator <=(Int3 left, Int3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Compares two <see cref="Int3"/> values to see if they are equal.
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Int3"/> value to compare.</param>
|
||||
/// <param name="right">The second <see cref="Int3"/> value to compare.</param>
|
||||
/// <returns>The result of comparing <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Bool3 operator ==(Int3 left, Int3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Compares two <see cref="Int3"/> values to see if they are not equal.
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Int3"/> value to compare.</param>
|
||||
/// <param name="right">The second <see cref="Int3"/> value to compare.</param>
|
||||
/// <returns>The result of comparing <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Bool3 operator !=(Int3 left, Int3 right) => default;
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする