0

although I am quite new to the iOS development, I have some experience with C. And somehow I get a strange error for in my code after starting XCode today. The code worked fine yesterday and I did save the project properly.

In the code there are simply 2 points taken and a vector formed with it. Then it calculates the orthogonal vector and its length with the fast inverse sqrt. I took it from here (Fastest Inverse Square Root on iPhone) and this uses the float32x2t datatype.

But I get now this error message for it:

Use of undeclared identifier 'float32x2_t'

The code:

CGPoint startPoint = [self transformPoint:[[copy objectAtIndex:i] CGPointValue]];
CGPoint endPoint = [self transformPoint:[[copy objectAtIndex:i+1] CGPointValue]];

GLKVector2 line = GLKVector2Make((endPoint.x - startPoint.x), (endPoint.y - startPoint.y));
GLKVector2 lineOrthogonal = GLKVector2Make(line.y, -line.x);

float32x2_t floatVector = {powf(lineOrthogonal.x, 2.0) + powf(lineOrthogonal.y, 2.0), 1.0f};
float32x2_t invsqrt = vrsqrte_f32(floatVector);

So how does this error message come and how do I fix it?

Community
  • 1
  • 1

1 Answers1

0

Ok, I found the answer by myself. It seems that an update of something within Xcode or the bad connection to the actual testing device on the USB-controller switched back the running device to the built-in simulators. And they don't understand the float32x2_t datatype, but the real device does.

But why is it like this?