De wetcalculator van HOOKE

I want to calculate
Spring Force Constant(k) = N/m
Distance from Equilibrium(x) = m
Spring Equilibrium Position(x0) = m
Force(Fx) = N
   

HOKE's wetformule

FORCE: F X = -K (X-X 0 )

Waar, X 0 is veer-evenwichtspositie, F X is FORCE, K is veerkracht constant, X is afstand van evenwicht.

Bijvoorbeeld, veerkrachtconstante (K) = 1 n / m, afstand van evenwicht (x) = 0,2 m, veerequilibriumpositie (x 0 ) = 0,1 M, dan dwingen = -1 (0.2 -0.1) = -0.2n.

function checnum(as)
{
var dd = as.value;

if(isNaN(dd))
{
dd = dd.substring(0,(dd.length-1));
as.value = dd;
}
}

function calsi()
{
var ty = doc