我有点困惑。请帮我 。我写了这段代码。我得到了 distX、distY 和 distZ 。现在我想要使用这三个的最终距离。
-(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
{
velX += (acceleration.x * intervalDate);
distX += (velX * intervalDate);
velY += (acceleration.y * intervalDate);
distY += (velY * intervalDate);
velZ += (acceleration.z * intervalDate);
distZ += (velZ * intervalDate);
}