trunc

Functions
trunc
Complete List of ArrayFire Functions ArrayFire Functions by Category » Mathematical functions » | Numeric functions

Truncate to nearest integer. More...

## Functions
AFAPI array | trunc (const array &in)
| C++ Interface for truncating an array of numbers. More...
AFAPI af_err | af_trunc (af_array *out, const af_array in)
| C Interface for truncating an array of numbers. More...

## Detailed Description

Truncate to nearest integer.

Note
  This function supports real inputs only. Complex inputs are not yet supported.

## Function Documentation

## § af_trunc()

AFAPI af_err af_trunc | ( | af_array * | out,
|  | const af_array | in
| ) |  |

C Interface for truncating an array of numbers.

Parameters

  [out] | out | will contain values truncated to nearest integer not greater than input
  [in] | in | is input array

Returns
  AF_SUCCESS if the execution completes properly

## § trunc()

AFAPI array af::trunc | ( | const array & | in | ) |

C++ Interface for truncating an array of numbers.

Parameters

  [in] | in | is input array

Returns
  values truncated to nearest integer not greater than input values