Center UI bugfix (#6434)

* init

* crlf

* crfl

* fix
This commit is contained in:
InsoPL
2026-03-02 17:06:24 +01:00
committed by GitHub
parent 1af32c3129
commit 41ad959192
+2 -3
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -23,8 +23,7 @@ namespace Robust.Shared.Maths
public readonly int Width => Math.Abs(Right - Left);
public readonly int Height => Math.Abs(Top - Bottom);
public readonly Vector2i Size => new(Width, Height);
public readonly Vector2 Center => TopRight - BottomLeft / 2;
public readonly Vector2 Center => new Vector2(Left + Right, Top + Bottom) / 2f;
public UIBox2i(Vector2i topLeft, Vector2i bottomRight)
{
Unsafe.SkipInit(out this);