mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
210
Brutal.Numerics/Vector/float2/float2.pack.gen.cs
Normal file
210
Brutal.Numerics/Vector/float2/float2.pack.gen.cs
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
// <auto-generated /> - edit Vector.pack.tt to modify
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.Numerics;
|
||||
|
||||
public partial struct float2
|
||||
{
|
||||
public static float2 Unpack(in sbyte2 vector, Func<sbyte, float> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out float2 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static float2 Unpack(in byte2 vector, Func<byte, float> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out float2 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static float2 Unpack(in short2 vector, Func<short, float> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out float2 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static float2 Unpack(in ushort2 vector, Func<ushort, float> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out float2 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static float2 Unpack(in int2 vector, Func<int, float> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out float2 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static float2 Unpack(in uint2 vector, Func<uint, float> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out float2 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static float2 Pack(in double2 vector, Func<double, float> elementConverter)
|
||||
{
|
||||
VectorPack.Pack(vector, out float2 result, elementConverter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static float2 Unpack(in sbyte2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast)
|
||||
{
|
||||
return Unpack(vector, PackUtils.SByte.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static float2 Unpack(in byte2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast)
|
||||
{
|
||||
return Unpack(vector, PackUtils.Byte.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static float2 Unpack(in short2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast)
|
||||
{
|
||||
return Unpack(vector, PackUtils.Short.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static float2 Unpack(in ushort2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast)
|
||||
{
|
||||
return Unpack(vector, PackUtils.UShort.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static float2 Unpack(in int2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast)
|
||||
{
|
||||
return Unpack(vector, PackUtils.Int.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static float2 Unpack(in uint2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast)
|
||||
{
|
||||
return Unpack(vector, PackUtils.UInt.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static float2 Pack(in double2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate)
|
||||
{
|
||||
return Pack(vector, PackUtils.Double.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<sbyte2> source,
|
||||
Span<float2> destination,
|
||||
Func<sbyte, float> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<byte2> source,
|
||||
Span<float2> destination,
|
||||
Func<byte, float> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<short2> source,
|
||||
Span<float2> destination,
|
||||
Func<short, float> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<ushort2> source,
|
||||
Span<float2> destination,
|
||||
Func<ushort, float> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<int2> source,
|
||||
Span<float2> destination,
|
||||
Func<int, float> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<uint2> source,
|
||||
Span<float2> destination,
|
||||
Func<uint, float> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void PackSpan(
|
||||
in ReadOnlySpan<double2> source,
|
||||
Span<float2> destination,
|
||||
Func<double, float> elementConverter
|
||||
)
|
||||
{
|
||||
VectorPack.Pack(source, destination, elementConverter);
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<sbyte2> source,
|
||||
Span<float2> destination,
|
||||
Unpack.Float mode = Numerics.Unpack.Float.Cast
|
||||
)
|
||||
{
|
||||
UnpackSpan(source, destination, PackUtils.SByte.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<byte2> source,
|
||||
Span<float2> destination,
|
||||
Unpack.Float mode = Numerics.Unpack.Float.Cast
|
||||
)
|
||||
{
|
||||
UnpackSpan(source, destination, PackUtils.Byte.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<short2> source,
|
||||
Span<float2> destination,
|
||||
Unpack.Float mode = Numerics.Unpack.Float.Cast
|
||||
)
|
||||
{
|
||||
UnpackSpan(source, destination, PackUtils.Short.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<ushort2> source,
|
||||
Span<float2> destination,
|
||||
Unpack.Float mode = Numerics.Unpack.Float.Cast
|
||||
)
|
||||
{
|
||||
UnpackSpan(source, destination, PackUtils.UShort.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<int2> source,
|
||||
Span<float2> destination,
|
||||
Unpack.Float mode = Numerics.Unpack.Float.Cast
|
||||
)
|
||||
{
|
||||
UnpackSpan(source, destination, PackUtils.Int.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static void UnpackSpan(
|
||||
in ReadOnlySpan<uint2> source,
|
||||
Span<float2> destination,
|
||||
Unpack.Float mode = Numerics.Unpack.Float.Cast
|
||||
)
|
||||
{
|
||||
UnpackSpan(source, destination, PackUtils.UInt.ToFloat(mode));
|
||||
}
|
||||
|
||||
public static void PackSpan(
|
||||
in ReadOnlySpan<double2> source,
|
||||
Span<float2> destination,
|
||||
Pack.Float mode = Numerics.Pack.Float.Truncate
|
||||
)
|
||||
{
|
||||
PackSpan(source, destination, PackUtils.Double.ToFloat(mode));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue