analysis/
mg_trunc.pro
includes main-level programRoutines
top mg_trunc
result = mg_trunc(x)
Truncate argument towards 0.0, i.e., takes the FLOOR
of positive values
and the CEIL
of negative values.
Return value
array of same type as argument
Parameters
- x in required type=float/double
array containing values to truncate
Examples
Try the main-level program at the end of this file. It does:
IDL> print, mg_trunc([1.2, -1.2, 0.0])
1 -1 0
IDL> print, floor([1.2, -1.2, 0.0])
1 -2 0
IDL> print, ceil([1.2, -1.2, 0.0])
2 -1 0
File attributes
Modification date: | Wed May 14 15:07:14 2014 |
Lines: | 11 |
Docformat: | rst rst |
Contact me if you have enhancement requests or bug fixes.