$ ./guess_the_languageGame Dev
Game Dev · medium · #267

What is y?

float y = smoothstep(0.4, 0.6, x);  // x = 0.3
  1. 0
  2. 0.3
  3. 0.5
  4. 1
smoothstep returns 0 below the first edge, 1 above the second and a smooth S-curve between, so x = 0.3 gives 0.
Play Game Dev ▸