Objective C / C static method performance

Here is a method from a class in some of Apple's example code. Why is this method defined as a static C method rather than an Objective C class method or a class method? In the context in which it is used I suppose it needs to be as performant as possible. Is this why? Is this the most performant way to declare a method?

static BOOL lineIntersectsRect(MKMapPoint p0, MKMapPoint p1, MKMapRect r)
    //Do stuff
    return MKMapRectIntersectsRect(r, r2);


It's not a static method, but rather a function. And it's probably defined as a function because it operates on two data types (MKMapPoint and MKMapRect) which are not objects (they are C structs) and thus can't have methods associated with them.

Need Your Help

Create a vector in R with double or triple values


I need to have a vector with a fixed number of elements e.g. 20. Usually I would take:

Passing special characters to mailto body blows up JavaScript

javascript jquery html mailto

I have a C# ASP.NET app that creates a JavaScript array of values for some user profile information. Client-side, I use jQuery/JavaScript to read the array and generate a mailto link. Some of the f...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.