swap(&pointArray[flag], &pointArray[index])
swift中的标准函数 如下
http://www.cocoachina.com/industry/20140619/8885.html