为什么我的双重失去价值?

时间:2011-09-15 23:54:35

标签: iphone objective-c variables floating-point double

- (void)useX:(double)x {
    self.XVelocity = x;
    //This is called by the app delegate every 1/60 times a second
    printf("%f",x);
}

在另一种方法中我使用

- (void)update {
    printf("%f",self.XVelocity);
}

和self.XVelocity等于0,我该如何修复

1 个答案:

答案 0 :(得分:0)

尝试删除“自我”。看看会发生什么。

相关问题