开发者

iphone sdk syntax

开发者 https://www.devze.com 2023-01-05 17:12 出处:网络
This is probably a really basic syntax question, but I can\'t find the answer. Can anyone tell me what this expression means开发者_JAVA技巧?

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

精彩评论

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

关注公众号