Skip to content

Commit

Permalink
Fix BoundingBox center size constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioarnold authored Apr 17, 2024
1 parent e24fcff commit b2ec530
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Spatial/BoundingBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public record struct BoundingBox(Vec3 Min, Vec3 Max)
public readonly Vec3 Size => Max - Min;

public BoundingBox(Vec3 position, float size)
: this(position - Vec3.One * size / 2, position + Vec3.One * size) {}
: this(position - Vec3.One * size / 2, position + Vec3.One * size / 2) {}

public readonly PlaneIntersectionType Intersects(in Plane plane)
{
Expand Down Expand Up @@ -120,4 +120,4 @@ public readonly StackList8<Vec3> GetCorners()
new Vec3(Min.X, Min.Y, Min.Z)
];
}
}
}

0 comments on commit b2ec530

Please sign in to comment.