diff --git a/js/medicine/utility.js b/js/medicine/utility.js index a7e2ba4d7cd20a6b08d4fb70db9883b0643661bb..07682ad63cc4a404a6ece4947b35515719de8d52 100644 --- a/js/medicine/utility.js +++ b/js/medicine/utility.js @@ -29,7 +29,7 @@ App.Medicine.pocketVolume = function() { // now the current skin area: 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 VMax = Math.PI / 6 * hMax * (3 * a * a + hMax * hMax);