Unstable 1.8.4.0
This commit is contained in:
@@ -71,7 +71,7 @@ namespace FarseerPhysics.Controllers
|
||||
f = Strength / r2 * worldBody.Mass * controllerBody.Mass * d;
|
||||
break;
|
||||
case GravityType.Linear:
|
||||
f = Strength / (float)Math.Sqrt(r2) * worldBody.Mass * controllerBody.Mass * d;
|
||||
f = Strength / MathF.Sqrt(r2) * worldBody.Mass * controllerBody.Mass * d;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace FarseerPhysics.Controllers
|
||||
f = Strength / r2 * worldBody.Mass * d;
|
||||
break;
|
||||
case GravityType.Linear:
|
||||
f = Strength / (float)Math.Sqrt(r2) * worldBody.Mass * d;
|
||||
f = Strength / MathF.Sqrt(r2) * worldBody.Mass * d;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace FarseerPhysics.Controllers
|
||||
|
||||
if (result > dt * _maxLinearSqared)
|
||||
{
|
||||
float sq = (float)Math.Sqrt(result);
|
||||
float sq = MathF.Sqrt(result);
|
||||
|
||||
float ratio = _maxLinearVelocity / sq;
|
||||
body._linearVelocity.X *= ratio;
|
||||
|
||||
Reference in New Issue
Block a user