refactor: Circle.Position to Circle.Center
This commit is contained in:
parent
3428fcc6ca
commit
350ef030ac
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue