Daily update on 20230505 by nitload youmu, confuse on OpenGL

This commit is contained in:
Nitload
2023-05-05 02:42:16 +08:00
parent 4dd3f4f6d1
commit 6da268056c
99 changed files with 58766 additions and 8132 deletions
+18 -2
View File
@@ -1,4 +1,5 @@
using System;
using StgSharp.Optimization;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Runtime.InteropServices;
@@ -6,7 +7,7 @@ using System.Text;
namespace StgSharp.Math
{
[StructLayout(LayoutKind.Explicit)]
[StructLayout(LayoutKind.Explicit,Size =12,Pack =16)]
public struct vec3d : IEquatable<vec3d>
{
[FieldOffset(0)]
@@ -129,5 +130,20 @@ namespace StgSharp.Math
vec.Z / x
);
}
public static implicit operator float[](vec3d vec)
{
return new float[3] { vec.X, vec.Y, vec.Y };
}
public static implicit operator m128(vec3d vec)
{
return new m128()
{
float0 = vec.X,
float1 = vec.Y,
float2 = vec.Z,
};
}
}
}