Skip to content

Commit

Permalink
Clarify math.
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanKell committed May 24, 2015
1 parent 0c1c031 commit b1872a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Engines/SolverRF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public void InitializeOverallEngineData(
k1 = t;
}
float minIsp = 0.0001f;
float maxP = k1.time + (minIsp - k1.value) / (k0.value - k1.value) * (k0.time - k1.time);
float invSlope = (k1.time - k0.time) / (k0.value - k1.value);
float maxP = k1.time + (k1.value - minIsp) * invSlope;

atmosphereCurve = new FloatCurve();
atmosphereCurve.Add(k0.time, k0.value, k0.inTangent, k0.outTangent);
Expand Down

0 comments on commit b1872a8

Please sign in to comment.