New IO structure, unexpexted error in C code
This commit is contained in:
@@ -1,22 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public struct colum2:IEquatable<colum2>
|
||||
public struct colum2 : IEquatable<colum2>
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public float X;
|
||||
[FieldOffset(4)]
|
||||
public float Y;
|
||||
|
||||
public colum2(float x,float y)
|
||||
public colum2(float x, float y)
|
||||
{
|
||||
X= x;
|
||||
Y= y;
|
||||
X = x;
|
||||
Y = y;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
@@ -49,7 +47,7 @@ namespace StgSharp.Math
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(X,Y);
|
||||
return HashCode.Combine(X, Y);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
@@ -57,7 +55,7 @@ namespace StgSharp.Math
|
||||
return $"{X}\n{Y}";
|
||||
}
|
||||
|
||||
public static colum2 operator +(colum2 c1,colum2 c2)
|
||||
public static colum2 operator +(colum2 c1, colum2 c2)
|
||||
{
|
||||
return new colum2(
|
||||
c1.X + c2.X,
|
||||
@@ -75,7 +73,7 @@ namespace StgSharp.Math
|
||||
|
||||
public static colum2 operator *(colum2 colum, float x)
|
||||
{
|
||||
return new colum2(colum.X * x,colum.Y * x);
|
||||
return new colum2(colum.X * x, colum.Y * x);
|
||||
}
|
||||
|
||||
public static colum2 operator /(colum2 colum, float x)
|
||||
|
||||
Reference in New Issue
Block a user