Previous topic

call

Next topic

CBAddObjects

This Page

castΒΆ

cast performs a C-cast operation, for example r = (double)(float) m.

r = cast(m, nType)

Return Value

r is a real matrix.

Parameters

m

m is a real matrix.

nType

nType is one of the following values:

CAST_INT8 (0)
CAST_UINT8 (1)
CAST_INT16 (2)
CAST_UINT16 (3)
CAST_INT32 (4)
CAST_UINT32 (5)
CAST_INT64 (6)
CAST_UINT64 (7)
CAST_FLOAT (8)

Example

* cast(500, CAST_INT8)
  -12.0000
* cast(500, CAST_UINT8)
  244.0000
* cast(500, CAST_UINT16)
  500.0000

id-1438918