mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 12:38:24 +01:00
32 lines
833 B
C#
32 lines
833 B
C#
// <auto-generated /> - edit Matrix.pack.tt to modify
|
|
#nullable enable
|
|
|
|
namespace Brutal.Numerics;
|
|
|
|
public partial struct float4x4
|
|
{
|
|
public static float4x4 Pack(in double4x4 vector, Func<double, float> elementConverter)
|
|
{
|
|
MatrixPack.Pack(vector, out float4x4 result, elementConverter);
|
|
return result;
|
|
}
|
|
|
|
public static void Pack(
|
|
in ReadOnlySpan<double4x4> source,
|
|
Span<float4x4> destination,
|
|
Func<double, float> elementConverter
|
|
)
|
|
{
|
|
MatrixPack.Pack(source, destination, elementConverter);
|
|
}
|
|
|
|
public static float4x4 Pack(in double4x4 vector)
|
|
{
|
|
return Pack(vector, f => (float)f);
|
|
}
|
|
|
|
public static void Pack(in ReadOnlySpan<double4x4> source, Span<float4x4> destination)
|
|
{
|
|
Pack(source, destination, f => (float)f);
|
|
}
|
|
}
|