New IO structure, unexpexted error in C code
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user