Files
sbox-public/engine/Sandbox.System/Math/NativeRect.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

26 lines
467 B
C#

using Sandbox;
internal struct NativeRect
{
public int x;
public int y;
public int w;
public int h;
public NativeRect( in int x, in int y, in int w, in int h )
{
this.x = x;
this.y = y;
this.w = w;
this.h = h;
}
public static implicit operator NativeRect( in Rect value )
{
return new NativeRect { x = (int)value.Left, y = (int)value.Top, w = (int)value.Width, h = (int)value.Height };
}
public readonly Rect Rect => new( x, y, w, h );
}