var numericX = Number(x);
//...
var absouleX = Math.abs(numericX );
//...
var scaledX = absouleX  / t;

???