servicepoint-tanks/TanksServer/Models/FloatPosition.cs

9 lines
305 B
C#
Raw Normal View History

2024-04-12 18:32:10 +02:00
using TanksServer.GameLogic;
2024-04-07 17:17:11 +02:00
namespace TanksServer.Models;
2024-04-12 18:32:10 +02:00
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;
}