toInt

fun toInt(): Int

Returns element as Int. For vector types, it will return size of the vector. For String type, it will type to be parsed as integer. Unsigned elements will become signed (with possible overflow). Float elements will be casted to Int

Return

Int or 0 if fail to convert element to integer.