chore: Removed System Using
This commit is contained in:
parent
8ebde9dedf
commit
dfcc877e58
|
@ -1,4 +1,3 @@
|
||||||
using System;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
@ -9,7 +8,7 @@ namespace Syntriax.Engine.Physics2D.Primitives;
|
||||||
|
|
||||||
public record Shape(IList<Vector2D> Vertices) : IEnumerable<Vector2D>
|
public record Shape(IList<Vector2D> Vertices) : IEnumerable<Vector2D>
|
||||||
{
|
{
|
||||||
public Vector2D this[Index index] => Vertices[index];
|
public Vector2D this[System.Index index] => Vertices[index];
|
||||||
|
|
||||||
public static Shape CreateCopy(Shape shape) => new(new List<Vector2D>(shape.Vertices));
|
public static Shape CreateCopy(Shape shape) => new(new List<Vector2D>(shape.Vertices));
|
||||||
|
|
||||||
|
@ -20,15 +19,15 @@ public record Shape(IList<Vector2D> Vertices) : IEnumerable<Vector2D>
|
||||||
|
|
||||||
foreach (Vector2D point in shape.Vertices)
|
foreach (Vector2D point in shape.Vertices)
|
||||||
{
|
{
|
||||||
minX = MathF.Min(minX, point.X);
|
minX = Math.Min(minX, point.X);
|
||||||
minY = MathF.Min(minY, point.Y);
|
minY = Math.Min(minY, point.Y);
|
||||||
maxX = MathF.Max(maxX, point.X);
|
maxX = Math.Max(maxX, point.X);
|
||||||
maxY = MathF.Max(maxY, point.Y);
|
maxY = Math.Max(maxY, point.Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
float dx = maxX - minX;
|
float dx = maxX - minX;
|
||||||
float dy = maxY - minY;
|
float dy = maxY - minY;
|
||||||
float deltaMax = MathF.Max(dx, dy);
|
float deltaMax = Math.Max(dx, dy);
|
||||||
float midX = (minX + maxX) / 2;
|
float midX = (minX + maxX) / 2;
|
||||||
float midY = (minY + maxY) / 2;
|
float midY = (minY + maxY) / 2;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue