可能重复:
CGFloat 添加错误?
我有一个 CGPoint(它只是一个围绕两个 CGFloats 的结构)。有人可以向我解释这两行代码如何:
player.position = CGPointMake(player.position.x + 12.8f, player.position.y + 12.8f);
NSLog(@"%f,%f", player.position.x, player.position.y);
正在生成此输出:
828.799988,236.800003
841.599976,249.600006
854.399963,262.399994
867.199951,275.199982
879.999939,287.999969
892.799927,300.799957
905.599915,313.599945
该点的起始值为 (816, 224);