Shader question!

hello everyone, i’m curious about shader language. so i write this question!

When I want to use the ‘ease’ function, why do I have to use another function instead of just putting a variable in parameter t?

for example,

float backInOut(float t) {
  float f = t < 0.5
    ? 2.0 * t
    : 1.0 - (2.0 * t - 1.0);

  float g = pow(f, 3.0) - f * sin(f * PI);

  return t < 0.5
    ? 0.5 * g
    : 0.5 * (1.0 - g) + 0.5;
}

void main() {
  float pct = backInOut(abs(fract(t) * 2.0 -1.0));
...
}

why use abs function, and fract function?
Is it related to resolution?

Not sure this forum might be a better help. They deal specifically with shaders.