Module 735556

519 characters · in 514.d733764d42c2ab66.js
Dependencies
Required by (1)
Lazily required by (0)none
Requires (0)none
Lazily requires (0)none
Source Raw
function(e){"use strict";function t(e){return(e-30)*3.62+194}e.exports={fromOrigamiTensionAndFriction:function(e,n){return{tension:t(e),friction:(n-8)*3+25}},fromBouncinessAndSpeed:function(e,n){var r,i,a,o=(e/1.7-0)/20,s=.5+(n/1.7-0)/20*199.5,l=(r=o=0+.8*o,i=function(e){return e<=18?7e-4*Math.pow(e,3)-.031*Math.pow(e,2)+.64*e+1.28:e>18&&e<=44?44e-6*Math.pow(e,3)-.006*Math.pow(e,2)+.36*e+2:45e-8*Math.pow(e,3)-332e-6*Math.pow(e,2)+.1078*e+5.84}(s),.01*(a=2*r-r*r)+(1-a)*i);return{tension:t(s),friction:(l-8)*3+25}}}}