Added conversion operator to primitive types

このコミットが含まれているのは:
Sergio Pedri committed 2020-12-08 00:21:09 +01:00
1 親 04b6d35009
コミット 8cab3f98f2
12ファイル変更
+216

検索条件に一致するファイルはありません

+18
ファイルの表示
@@ -142,6 +142,24 @@ namespace ComputeSharp
/// <param name="x">The value to use for the components of the new <see cref="Double2"/> instance.</param>
public static implicit operator Double2(double x) => new(x, x);
/// <summary>
/// Casts a <see cref="Double2"/> value to a <see cref="Int2"/> one.
/// </summary>
/// <param name="xy">The input <see cref="Double2"/> value to cast.</param>
public static explicit operator Int2(Double2 xy) => throw new InvalidExecutionContextException($"{nameof(Double2)}.({nameof(Int2)})");
/// <summary>
/// Casts a <see cref="Double2"/> value to a <see cref="UInt2"/> one.
/// </summary>
/// <param name="xy">The input <see cref="Double2"/> value to cast.</param>
public static explicit operator UInt2(Double2 xy) => throw new InvalidExecutionContextException($"{nameof(Double2)}.({nameof(UInt2)})");
/// <summary>
/// Casts a <see cref="Double2"/> value to a <see cref="Float2"/> one.
/// </summary>
/// <param name="xy">The input <see cref="Double2"/> value to cast.</param>
public static explicit operator Float2(Double2 xy) => throw new InvalidExecutionContextException($"{nameof(Double2)}.({nameof(Float2)})");
/// <summary>
/// Sums two <see cref="Double2"/> values.
/// </summary>
+18
ファイルの表示
@@ -563,6 +563,24 @@ namespace ComputeSharp
/// <param name="x">The value to use for the components of the new <see cref="Double3"/> instance.</param>
public static implicit operator Double3(double x) => new(x, x, x);
/// <summary>
/// Casts a <see cref="Double3"/> value to a <see cref="Int3"/> one.
/// </summary>
/// <param name="xyz">The input <see cref="Double3"/> value to cast.</param>
public static explicit operator Int3(Double3 xyz) => throw new InvalidExecutionContextException($"{nameof(Double3)}.({nameof(Int3)})");
/// <summary>
/// Casts a <see cref="Double3"/> value to a <see cref="UInt3"/> one.
/// </summary>
/// <param name="xyz">The input <see cref="Double3"/> value to cast.</param>
public static explicit operator UInt3(Double3 xyz) => throw new InvalidExecutionContextException($"{nameof(Double3)}.({nameof(UInt3)})");
/// <summary>
/// Casts a <see cref="Double3"/> value to a <see cref="Float3"/> one.
/// </summary>
/// <param name="xyz">The input <see cref="Double3"/> value to cast.</param>
public static explicit operator Float3(Double3 xyz) => throw new InvalidExecutionContextException($"{nameof(Double3)}.({nameof(Float3)})");
/// <summary>
/// Sums two <see cref="Double3"/> values.
/// </summary>
+18
ファイルの表示
@@ -3968,6 +3968,24 @@ namespace ComputeSharp
/// <param name="x">The value to use for the components of the new <see cref="Double4"/> instance.</param>
public static implicit operator Double4(double x) => new(x, x, x, x);
/// <summary>
/// Casts a <see cref="Double4"/> value to a <see cref="Int4"/> one.
/// </summary>
/// <param name="xyzw">The input <see cref="Double4"/> value to cast.</param>
public static explicit operator Int4(Double4 xyzw) => throw new InvalidExecutionContextException($"{nameof(Double4)}.({nameof(Int4)})");
/// <summary>
/// Casts a <see cref="Double4"/> value to a <see cref="UInt4"/> one.
/// </summary>
/// <param name="xyzw">The input <see cref="Double4"/> value to cast.</param>
public static explicit operator UInt4(Double4 xyzw) => throw new InvalidExecutionContextException($"{nameof(Double4)}.({nameof(UInt4)})");
/// <summary>
/// Casts a <see cref="Double4"/> value to a <see cref="Float4"/> one.
/// </summary>
/// <param name="xyzw">The input <see cref="Double4"/> value to cast.</param>
public static explicit operator Float4(Double4 xyzw) => throw new InvalidExecutionContextException($"{nameof(Double4)}.({nameof(Float4)})");
/// <summary>
/// Sums two <see cref="Double4"/> values.
/// </summary>