Older Newer
Tue, 07 Jan 2020 02:39:42 . . . . SyneRyder [Function definition]


Changes by last author:

Added:
= ichop =

== Syntax ==

int ichop(double number)

== Arguments ==

:number

::Any double or float number.

== Return ==

The truncated value as an integer.

== Description ==

Returns the value of number truncated, towards 0.0, to an integral value, as an integer.

== Example ==

<code>

%ffp

OnFilterStart:

{

// Result of this should be 2

Info("Chopping 2.543 towards 0.0 gives %d", ichop(2.543));

// Result of this should be -2

Info("Chopping -2.345 towards 0.0 gives %d", ichop(-2.345));

}

</code>

== See Also ==

chop, iceil, ifloor, iround, ipow