func sqr(x : f32) -> f32: return x * x func smoothstep(x : f32) -> f32: return sqr(x) * (3.0 - 2.0 * x)