Added implicit operators for the Int2, Int3 and Int4 structs
このコミットが含まれているのは:
1 親
bb65e686a7
コミット
d9ef5c9742
3ファイル変更
+18
検索条件に一致するファイルはありません
@@ -113,5 +113,11 @@ namespace ComputeSharp.Shaders.Primitives.Int
|
||||
/// Gets an <see cref="Int2"/> value with the <see cref="G"/> value for all components
|
||||
/// </summary>
|
||||
public Int2 GG => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(GG)}");
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="Int2"/> value with the same value for all its components
|
||||
/// </summary>
|
||||
/// <param name="x">The value to use for the components of the new <see cref="Int2"/> instance</param>
|
||||
public static implicit operator Int2(int x) => new Int2(x, x);
|
||||
}
|
||||
}
|
||||
@@ -529,5 +529,11 @@ namespace ComputeSharp.Shaders.Primitives.Int
|
||||
/// Gets an <see cref="Int3"/> value with the <see cref="B"/> value for all components
|
||||
/// </summary>
|
||||
public Int2 BBB => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BBB)}");
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="Int3"/> value with the same value for all its components
|
||||
/// </summary>
|
||||
/// <param name="x">The value to use for the components of the new <see cref="Int3"/> instance</param>
|
||||
public static implicit operator Int3(int x) => new Int3(x, x, x);
|
||||
}
|
||||
}
|
||||
@@ -3929,5 +3929,11 @@ namespace ComputeSharp.Shaders.Primitives.Int
|
||||
/// Gets an <see cref="Int4"/> value with the <see cref="A"/> value for all components
|
||||
/// </summary>
|
||||
public Int4 AAAA => throw new InvalidExecutionContextException($"{nameof(Int4)}.{nameof(AAAA)}");
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="Int4"/> value with the same value for all its components
|
||||
/// </summary>
|
||||
/// <param name="x">The value to use for the components of the new <see cref="Int4"/> instance</param>
|
||||
public static implicit operator Int4(int x) => new Int4(x, x, x, x);
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする