OpenGL rebuild project start!
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
using Steamworks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
|
||||
[StructLayout(LayoutKind.Explicit,Size = 8)]
|
||||
public unsafe struct vec2dInt
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public int X;
|
||||
[FieldOffset(4)]
|
||||
public int Y;
|
||||
|
||||
public vec2dInt(int x, int y)
|
||||
{
|
||||
this.X = x;
|
||||
this.Y = y;
|
||||
}
|
||||
|
||||
public static implicit operator vec2d(vec2dInt vec)
|
||||
{
|
||||
return new vec2d(vec.X,vec.Y);
|
||||
}
|
||||
public static implicit operator vec2dInt(vec2d vec)
|
||||
{
|
||||
return new vec2dInt((int)vec.X, (int)vec.Y);
|
||||
}
|
||||
|
||||
public static vec2dInt operator +(vec2dInt vec1, vec2dInt vec2)
|
||||
{
|
||||
return new vec2dInt(vec1.X + vec2.X, vec1.Y + vec2.Y);
|
||||
}
|
||||
public static vec2dInt operator -(vec2dInt vec1, vec2dInt vec2)
|
||||
{
|
||||
return new vec2dInt(vec1.X - vec2.X, vec1.Y - vec2.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user