servicepoint-tanks/TanksServer/Models/FloatPosition.cs
2024-04-13 16:27:45 +02:00

12 lines
365 B
C#

using System.Diagnostics;
using TanksServer.GameLogic;
namespace TanksServer.Models;
[DebuggerDisplay("({X} | {Y})")]
internal readonly struct FloatPosition(double x, double y)
{
public double X { get; } = (x + MapService.PixelsPerRow) % MapService.PixelsPerRow;
public double Y { get; } = (y + MapService.PixelsPerColumn) % MapService.PixelsPerColumn;
}