@@ -25,7 +25,7 @@ public static class B2Distances
2525#endif
2626
2727 /// Evaluate the transform sweep at a specific time.
28- public static B2Transform b2GetSweepTransform ( ref B2Sweep sweep , float time )
28+ public static B2Transform b2GetSweepTransform ( in B2Sweep sweep , float time )
2929 {
3030 // https://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/
3131 B2Transform xf ;
@@ -139,7 +139,7 @@ public static B2ShapeProxy b2MakeProxy(ReadOnlySpan<B2Vec2> points, int count, f
139139 }
140140
141141 /// Make a proxy with a transform. This is a deep copy of the points.
142- public static B2ShapeProxy b2MakeOffsetProxy ( ReadOnlySpan < B2Vec2 > points , int count , float radius , B2Vec2 position , B2Rot rotation )
142+ public static B2ShapeProxy b2MakeOffsetProxy ( ReadOnlySpan < B2Vec2 > points , int count , float radius , B2Vec2 position , in B2Rot rotation )
143143 {
144144 count = b2MinInt ( count , B2_MAX_POLYGON_VERTICES ) ;
145145 B2Transform transform = new B2Transform ( position , rotation ) ;
@@ -980,8 +980,8 @@ public static B2SeparationFunction b2MakeSeparationFunction(ref B2SimplexCache c
980980 f. sweepA = sweepA;
981981 f. sweepB = sweepB;
982982
983- B2Transform xfA = b2GetSweepTransform ( ref sweepA , t1 ) ;
984- B2Transform xfB = b2GetSweepTransform ( ref sweepB , t1 ) ;
983+ B2Transform xfA = b2GetSweepTransform ( sweepA , t1 ) ;
984+ B2Transform xfB = b2GetSweepTransform ( sweepB , t1 ) ;
985985
986986 if ( count = = 1 )
987987 {
@@ -1049,8 +1049,8 @@ public static B2SeparationFunction b2MakeSeparationFunction(ref B2SimplexCache c
10491049
10501050 internal static float b2FindMinSeparation ( ref B2SeparationFunction f , ref int indexA , ref int indexB , float t )
10511051 {
1052- B2Transform xfA = b2GetSweepTransform( ref f . sweepA , t ) ;
1053- B2Transform xfB = b2GetSweepTransform( ref f . sweepB , t ) ;
1052+ B2Transform xfA = b2GetSweepTransform( f . sweepA , t ) ;
1053+ B2Transform xfB = b2GetSweepTransform ( f . sweepB , t ) ;
10541054
10551055 switch ( f . type )
10561056 {
@@ -1117,8 +1117,8 @@ internal static float b2FindMinSeparation(ref B2SeparationFunction f, ref int in
11171117 //
11181118 static float b2EvaluateSeparation ( B2SeparationFunction f , int indexA , int indexB , float t )
11191119 {
1120- B2Transform xfA = b2GetSweepTransform( ref f . sweepA , t ) ;
1121- B2Transform xfB = b2GetSweepTransform( ref f . sweepB , t ) ;
1120+ B2Transform xfA = b2GetSweepTransform( f . sweepA , t ) ;
1121+ B2Transform xfB = b2GetSweepTransform ( f . sweepB , t ) ;
11221122
11231123 switch ( f . type )
11241124 {
@@ -1215,8 +1215,8 @@ public static B2TOIOutput b2TimeOfImpact(ref B2TOIInput input)
12151215 // This loop terminates when an axis is repeated (no progress is made).
12161216 for ( ; ; )
12171217 {
1218- B2Transform xfA = b2GetSweepTransform ( ref sweepA , t1 ) ;
1219- B2Transform xfB = b2GetSweepTransform ( ref sweepB , t1 ) ;
1218+ B2Transform xfA = b2GetSweepTransform ( sweepA , t1 ) ;
1219+ B2Transform xfB = b2GetSweepTransform ( sweepB , t1 ) ;
12201220
12211221 // Get the distance between shapes. We can also use the results
12221222 // to get a separating axis.
0 commit comments