Scripting > Math Functions


Truncate to Whole Numbers

truncate()

 

Truncates values in a time series or paired data set to the nearest whole number.  For example:

 

10.99  is truncated to 10.

 

The x-values in paired data sets are unaffected by the function, only the y-value data are truncated.  Missing values remain missing.

 

For paired data, use the setCurve method to first select the curve(s).

 

See also:  setCurve()

Parameters:  Takes no parameters

Example: newDataSet = dataSet.truncate()

Returns:  A new HecMath object of the same type as the current object