I know there have been questions asked on this topic but they all differ slightly
what I want is a simple method that you pass an x value a y value and a quadrant value and it returns angle so far I have…
-(float)getAngle: (float)x yvalue:(float)y Quadrant:(float) quadrant{
float angle=0.0;
if(quadrant==1){
}
NSLog(@"%f",x);
return angle;
}
im not concerned about calculations at this point. I just want to know how to properly declare this method, because it wont let me name the first parameter.
Your code, as is, would work fine. Suppose you have a method like what you posted:
You could call this within the current class, and receive the returned value, like so: