Fract

Returns the fractional part of x.

(module
  (func (export "fract") (param $x f32) (result f32)
    (f32.sub
      (get_local $x)
      (f32.floor (get_local $x))
    )
  )
)

Last updated