Move True/False and One/Zero properties to T4 templates
このコミットが含まれているのは:
1 親
2de22e1cb3
コミット
f5c4e6aacd
31ファイル変更
+181
-152
検索条件に一致するファイルはありません
@@ -7,16 +7,6 @@ namespace ComputeSharp;
|
||||
/// </summary>
|
||||
public partial struct Int2
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets an <see cref="Int2"/> value with all components set to 0.
|
||||
/// </summary>
|
||||
public static Int2 Zero => 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="Int2"/> value with all components set to 1.
|
||||
/// </summary>
|
||||
public static Int2 One => 1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="Int2"/> value with the <see cref="X"/> component set to 1, and the others to 0.
|
||||
/// </summary>
|
||||
|
||||
@@ -37,6 +37,16 @@ public unsafe partial struct Int2
|
||||
/// <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 readonly ref int this[int i] => ref *(int*)UndefinedData;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="Int2"/> value with all components set to 0.
|
||||
/// </summary>
|
||||
public static Int2 Zero => 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="Int2"/> value with all components set to 1.
|
||||
/// </summary>
|
||||
public static Int2 One => 1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reference to the <see cref="int"/> value representing the <c>X</c> component.
|
||||
/// </summary>
|
||||
|
||||
@@ -7,16 +7,6 @@ namespace ComputeSharp;
|
||||
/// </summary>
|
||||
public partial struct Int3
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets an <see cref="Int3"/> value with all components set to 0.
|
||||
/// </summary>
|
||||
public static Int3 Zero => 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="Int3"/> value with all components set to 1.
|
||||
/// </summary>
|
||||
public static Int3 One => 1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="Int3"/> value with the <see cref="X"/> component set to 1, and the others to 0.
|
||||
/// </summary>
|
||||
|
||||
@@ -40,6 +40,16 @@ public unsafe partial struct Int3
|
||||
/// <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 readonly ref int this[int i] => ref *(int*)UndefinedData;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="Int3"/> value with all components set to 0.
|
||||
/// </summary>
|
||||
public static Int3 Zero => 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="Int3"/> value with all components set to 1.
|
||||
/// </summary>
|
||||
public static Int3 One => 1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reference to the <see cref="int"/> value representing the <c>X</c> component.
|
||||
/// </summary>
|
||||
|
||||
@@ -7,16 +7,6 @@ namespace ComputeSharp;
|
||||
/// </summary>
|
||||
public partial struct Int4
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets an <see cref="Int4"/> value with all components set to 0.
|
||||
/// </summary>
|
||||
public static Int4 Zero => 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="Int4"/> value with all components set to 1.
|
||||
/// </summary>
|
||||
public static Int4 One => 1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="Int4"/> value with the <see cref="X"/> component set to 1, and the others to 0.
|
||||
/// </summary>
|
||||
|
||||
@@ -43,6 +43,16 @@ public unsafe partial struct Int4
|
||||
/// <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 readonly ref int this[int i] => ref *(int*)UndefinedData;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="Int4"/> value with all components set to 0.
|
||||
/// </summary>
|
||||
public static Int4 Zero => 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="Int4"/> value with all components set to 1.
|
||||
/// </summary>
|
||||
public static Int4 One => 1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reference to the <see cref="int"/> value representing the <c>X</c> component.
|
||||
/// </summary>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする