Added conversion operator to primitive types
このコミットが含まれているのは:
1 親
04b6d35009
コミット
8cab3f98f2
12ファイル変更
+216
検索条件に一致するファイルはありません
@@ -142,6 +142,24 @@ namespace ComputeSharp
|
||||
/// <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(x, x);
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int2"/> value to a <see cref="UInt2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="xy">The input <see cref="Int2"/> value to cast.</param>
|
||||
public static explicit operator UInt2(Int2 xy) => throw new InvalidExecutionContextException($"{nameof(Int2)}.({nameof(UInt2)})");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int2"/> value to a <see cref="Float2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="xy">The input <see cref="Int2"/> value to cast.</param>
|
||||
public static explicit operator Float2(Int2 xy) => throw new InvalidExecutionContextException($"{nameof(Int2)}.({nameof(Float2)})");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int2"/> value to a <see cref="Double2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="xy">The input <see cref="Int2"/> value to cast.</param>
|
||||
public static explicit operator Double2(Int2 xy) => throw new InvalidExecutionContextException($"{nameof(Int2)}.({nameof(Double2)})");
|
||||
|
||||
/// <summary>
|
||||
/// Sums two <see cref="Int2"/> values.
|
||||
/// </summary>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする