Name |
int()整数转换 |
Examples |
float f = 65.0; int i = int(f); println(f + ” : ” + i); // Prints “65.0 : 65”
char c = ‘E’; i = int(c); println(c + ” : ” + i); // Prints “E : 69” |
Description |
Converts any value of a primitive data type (boolean, byte, char, color, float, int, or long) to its integer representation. When an array of values is passed in, then an int array of the same length is returned. 将基元数据类型的任何值 (布尔、字节、char、颜色、浮点、int 或 long) 转换为其整数表示形式。
在传入值数组时, 返回相同长度的 int 数组。 |
- 本文固定链接: http://iprocessing.cn/2017/07/20/int整数转换/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表