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>
|
||||
|
||||
@@ -563,6 +563,24 @@ namespace ComputeSharp
|
||||
/// <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(x, x, x);
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int3"/> value to a <see cref="UInt3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="xyz">The input <see cref="Int3"/> value to cast.</param>
|
||||
public static explicit operator UInt3(Int3 xyz) => throw new InvalidExecutionContextException($"{nameof(Int3)}.({nameof(UInt3)})");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int3"/> value to a <see cref="Float3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="xyz">The input <see cref="Int3"/> value to cast.</param>
|
||||
public static explicit operator Float3(Int3 xyz) => throw new InvalidExecutionContextException($"{nameof(Int3)}.({nameof(Float3)})");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int3"/> value to a <see cref="Double3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="xyz">The input <see cref="Int3"/> value to cast.</param>
|
||||
public static explicit operator Double3(Int3 xyz) => throw new InvalidExecutionContextException($"{nameof(Int3)}.({nameof(Double3)})");
|
||||
|
||||
/// <summary>
|
||||
/// Sums two <see cref="Int3"/> values.
|
||||
/// </summary>
|
||||
|
||||
@@ -3968,6 +3968,24 @@ namespace ComputeSharp
|
||||
/// <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(x, x, x, x);
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int4"/> value to a <see cref="UInt4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="xyzw">The input <see cref="Int4"/> value to cast.</param>
|
||||
public static explicit operator UInt4(Int4 xyzw) => throw new InvalidExecutionContextException($"{nameof(Int4)}.({nameof(UInt4)})");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int4"/> value to a <see cref="Float4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="xyzw">The input <see cref="Int4"/> value to cast.</param>
|
||||
public static explicit operator Float4(Int4 xyzw) => throw new InvalidExecutionContextException($"{nameof(Int4)}.({nameof(Float4)})");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int4"/> value to a <see cref="Double4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="xyzw">The input <see cref="Int4"/> value to cast.</param>
|
||||
public static explicit operator Double4(Int4 xyzw) => throw new InvalidExecutionContextException($"{nameof(Int4)}.({nameof(Double4)})");
|
||||
|
||||
/// <summary>
|
||||
/// Sums two <see cref="Int4"/> values.
|
||||
/// </summary>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする