Skip to content

Commit

Permalink
Use sequential struct layout in SimplexSolver
Browse files Browse the repository at this point in the history
  • Loading branch information
notgiven688 committed Jan 11, 2025
1 parent 2b37b15 commit a32ffd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Jitter2/Collision/NarrowPhase/SimplexSolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@

using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Jitter2.LinearMath;

#pragma warning disable CS0649 // Field is never assigned to, and will always have its default value

namespace Jitter2.Collision;

// This is a GJK-Implementation "by the book".

[StructLayout(LayoutKind.Sequential)]
public unsafe struct SimplexSolver
{
const Real Epsilon = (Real)1e-8;
Expand Down
4 changes: 2 additions & 2 deletions src/Jitter2/Collision/NarrowPhase/SimplexSolverAB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Jitter2.LinearMath;

using Vertex = Jitter2.Collision.MinkowskiDifference.Vertex;
Expand All @@ -31,8 +32,7 @@

namespace Jitter2.Collision;

// This is a GJK-Implementation "by the book".

[StructLayout(LayoutKind.Sequential)]
public unsafe struct SimplexSolverAB
{
const Real Epsilon = (Real)1e-8;
Expand Down

0 comments on commit a32ffd0

Please sign in to comment.