Older Newer
Tue, 07 Jan 2020 02:35:38 . . . . SyneRyder [Tweak formatting, add link to ichop]


Changes by last author:

Added:
= chop =

== Syntax ==

double chop(double number)

== Arguments ==

:number

::Any double or float number.

== Return ==

The truncated value.

== Description ==

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

== Example ==

<code>

%ffp

OnFilterStart:

{

Info("Chopping 2.543 towards 0.0 gives %f", chop(2.543));

Info("Chopping -2.345 towards 0.0 gives %f", chop(-2.345));

}

</code>

== See Also ==

ceil, floor, ichop, round, C Runtime Functions