Skip to content
Snippets Groups Projects
Commit db775efa authored by svornost's avatar svornost
Browse files

Clamp skin stretch scaling at 45 years old. I'm not convinced about the...

Clamp skin stretch scaling at 45 years old.  I'm not convinced about the utility of elasticity in this application, but at least we can prevent total calcification of elderly slaves, which is clearly wrong.
parent 51ead466
No related branches found
No related tags found
1 merge request!11049Fixes
...@@ -29,7 +29,7 @@ App.Medicine.pocketVolume = function() { ...@@ -29,7 +29,7 @@ App.Medicine.pocketVolume = function() {
// now the current skin area: // now the current skin area:
const A = Math.PI * (a * a + h * h); const A = Math.PI * (a * a + h * h);
const skinStretchFactor = linearInterpolation(Math.max(slave.physicalAge, 13), 13, 1.5, 45, 1.15); const skinStretchFactor = linearInterpolation(Math.clamp(slave.physicalAge, 13, 45), 13, 1.5, 45, 1.15);
const hMax = Math.sqrt(A * skinStretchFactor / Math.PI - a * a); const hMax = Math.sqrt(A * skinStretchFactor / Math.PI - a * a);
const VMax = Math.PI / 6 * hMax * (3 * a * a + hMax * hMax); const VMax = Math.PI / 6 * hMax * (3 * a * a + hMax * hMax);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment