fork download
  1. let erp = 10.0
  2. let cfm = 2.0
  3. let dt = 0.016
  4.  
  5. let W = 1.0 / cfm
  6.  
  7. let spring = erp * W / dt
  8. let damping = W - dt * spring
  9.  
  10. printfn "For ERP = %f and CFM = %f and dt = %f" erp cfm dt
  11. printfn "spring = %f, damping = %f" spring damping
  12.  
Success #stdin #stdout 0.02s 132544KB
stdin
Standard input is empty
stdout
For ERP = 10.000000 and CFM = 2.000000 and dt = 0.016000
spring = 312.500000, damping = -4.500000