开发者

iphone sdk syntax

This is probably a really basic syntax question, but I can't find the answer.

Can anyone tell me what this expression means开发者_JAVA技巧?

objPoint.x = -objPoint.x; 

As a note, objPoint is a CGPoint

Thanks!


You change the horizontal coordination to its negative.

Another example is that:

x = 7;
x = -x;

Then it will become x = -7;

This is the evaluation process:

The evaluation process will be ran in the right hand side first, so the process is:

replace x with 7, the right hand side of -x will become -7.

then assign it to the left hand side: x = -7;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜