Site Tools
Sidebar
User's Manual
t2:inv
inv
inv - Inverse value
Description
int32 inv(int32 num);
fix32 inv(fix32 num);
Returns the inverse value of num.
Parameters
- num: The numeric value to process.
Return Value
The inverse value of num. If the argument number is of type fix32, the return type is also fix32, otherwise it is integer.
Examples
Example #1 inv() example
init { printf("%.1f", inv(-4.2)); // 4.2 (fix32) printf("%d", inv(5)); // -5 (integer) printf("%d", inv(-5)); // 5 (integer) }
See Also
t2/inv.txt · Last modified: 2017/06/28 04:19 by J2Kbr