rndlong

Rounds x to the nearest int or long.

This is generally the fastest method to convert a floating-point number to an integer. Note that the results from this function depend on the rounding mode, if the fractional part of x is exactly 0.5. If using the default rounding mode (ties round to even integers) rndint(4.5) == 4, rndint(5.5)==6.

  1. int rndint(real x)
  2. long rndlong(real x)
    long
    rndlong
    (
    real x
    )

Meta