New IO structure, unexpexted error in C code

This commit is contained in:
Nitload
2023-06-22 03:33:24 +08:00
parent 50b4965e54
commit ee8132c149
172 changed files with 1344 additions and 4023 deletions
+9 -12
View File
@@ -1,12 +1,9 @@
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Runtime.InteropServices;
using System.Text;
namespace StgSharp.Math
{
[StructLayout(LayoutKind.Explicit,Size =12,Pack =16)]
[StructLayout(LayoutKind.Explicit, Size = 12, Pack = 16)]
public struct vec3d : IEquatable<vec3d>
{
[FieldOffset(0)]
@@ -31,7 +28,7 @@ namespace StgSharp.Math
}
else
{
return this.X == other.X
return this.X == other.X
&& this.Y == other.Y
&& this.Z == other.Z;
}
@@ -63,17 +60,17 @@ namespace StgSharp.Math
return $"{X}\t{Y}\t{Z}";
}
public static bool operator ==(vec3d vec1,vec3d vec2)
public static bool operator ==(vec3d vec1, vec3d vec2)
{
return vec1.X == vec2.X
&& vec1.Y == vec2.Y
return vec1.X == vec2.X
&& vec1.Y == vec2.Y
&& vec1.Z == vec2.Z;
}
public static bool operator !=(vec3d vec1, vec3d vec2)
{
return !(vec1.X == vec2.X
&& vec1.Y == vec2.Y
return !(vec1.X == vec2.X
&& vec1.Y == vec2.Y
&& vec1.Z == vec2.Z);
}
@@ -97,7 +94,7 @@ namespace StgSharp.Math
public static float operator *(vec3d vec1, vec3d vec2)
{
return
return
vec1.X * vec2.X
+ vec1.Y + vec2.Y
+ vec1.Z + vec2.Z;
@@ -112,7 +109,7 @@ namespace StgSharp.Math
);
}
public static vec3d operator *( float x, vec3d vec)
public static vec3d operator *(float x, vec3d vec)
{
return new vec3d(
vec.X * x,