Fix dual terrain arc placement

This commit is contained in:
2026-05-08 22:22:55 +02:00
parent 15fb522ac6
commit 4827eefa9b

View File

@@ -249,17 +249,17 @@ public sealed partial class MainWindow
var radiusX = (float)rect.Width / 2;
var radiusY = (float)rect.Height / 2;
var start = corner switch {
c_TopLeftFloor => new Vector2(center.X, (float)(rect.Y + rect.Height)),
c_TopRightFloor => new Vector2((float)rect.X, center.Y),
c_BottomRightFloor => new Vector2(center.X, (float)rect.Y),
c_BottomLeftFloor => new Vector2((float)(rect.X + rect.Width), center.Y),
c_TopLeftFloor => new Vector2(center.X, (float)rect.Y),
c_TopRightFloor => new Vector2((float)(rect.X + rect.Width), center.Y),
c_BottomRightFloor => new Vector2(center.X, (float)(rect.Y + rect.Height)),
c_BottomLeftFloor => new Vector2((float)rect.X, center.Y),
_ => center
};
var end = corner switch {
c_TopLeftFloor => new Vector2((float)(rect.X + rect.Width), center.Y),
c_TopRightFloor => new Vector2(center.X, (float)(rect.Y + rect.Height)),
c_BottomRightFloor => new Vector2((float)rect.X, center.Y),
c_BottomLeftFloor => new Vector2(center.X, (float)rect.Y),
c_TopLeftFloor => new Vector2((float)rect.X, center.Y),
c_TopRightFloor => new Vector2(center.X, (float)rect.Y),
c_BottomRightFloor => new Vector2((float)(rect.X + rect.Width), center.Y),
c_BottomLeftFloor => new Vector2(center.X, (float)(rect.Y + rect.Height)),
_ => center
};