Navigation

Operators and Keywords

Function List:

C++ API

: fix (x)

Truncate fractional portion of x and return the integer portion.

This is equivalent to rounding towards zero. If x is complex, return fix (real (x)) + fix (imag (x)) * I.

fix ([-2.7, 2.7])
  ⇒ -2    2

See also: ceil, floor, round.

Package: octave