toint

From DavinciWiki
Jump to: navigation, search

Description

Converts numeric values to 32-bit signed integers, while preserving their relative scale

Arguments and Return Values

Arguments: a numeric array, and optionally the minimum and maximum values to use for the output data

Return Value: An int array

Usage

Syntax: toint(inputdata, [, minval = VAL] [, maxval = VAL])

This is a wrapper for tointeger, in which the integertype parameter of that function is specified as "int".

Examples

dv> d
4x1x1 array of float, bsq format [16 bytes]
0.5000000000    0.0000000000    0.7500000000    1.000000000

dv> toint(d)
4x1x1 array of int, bsq format [16 bytes]
0       -2147483648     1073741824      2147483647

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Recent Library Changes

Created On: 07-16-2012
Modified On: 05-02-2013

Personal tools