refactor: Circle.Position to Circle.Center

This commit is contained in:
Syntriax 2024-01-24 18:44:26 +03:00
parent 3428fcc6ca
commit 350ef030ac
1 changed files with 2 additions and 2 deletions

View File

@ -2,13 +2,13 @@ using Syntriax.Engine.Core;
namespace Syntriax.Engine.Physics2D.Primitives;
public record Circle(Vector2D Position, float Radius)
public record Circle(Vector2D Center, float Radius)
{
public float RadiusSquared => Radius * Radius;
public float Diameter => 2f * Radius;
public static bool ApproximatelyEquals(Circle left, Circle right)
=> left.Position.ApproximatelyEquals(right.Position) && left.Radius.ApproximatelyEquals(right.Radius);
=> left.Center.ApproximatelyEquals(right.Center) && left.Radius.ApproximatelyEquals(right.Radius);
}
public static class CircleExtensions