| 1: | func @trunc = <{FROM: Type, TO: Type}> (from: FROM) #unsafe -> TO; |
Truncate any integral type to any other smaller integral type. Requires that @numBits<{FROM, false}>() > @numBits<{TO, false}>().
FROM: type to convert from - must be integral or vector or integral
TO: type to convert to - must be integral or vector or integral
from: value to convert
Returns converted value
FROM and TO must be both a vector or neither a vector. If they are a vector, they must contain the same number of elements.
(TODO)
| @ftrunc | Truncate any floating-point type to any other smaller floating-point type |