Closest Integer

Syntax


y = rint(x)

Description


Returns the closest double precision value to the passed argument (which can be an expression evaluating to a double precision) that is equal to an integer.  If two values are equally close, the value that it even is returned.

Example


y = rint(10.0*cos(t)))