Forces x to be between or the min and max range.
(module (func $clamp (export "clamp") (param $x f32) (param $min f32) (param $max f32) (result f32) (f32.min (f32.max (get_local $x) (get_local $min) ) (get_local $max) ) ) )
Last updated 5 years ago
Was this helpful?