public int Compare(CGPoint x, CGPoint y) { float rX = CGUtils.GetRotateAngleInRadians(from, piovt, x); float rY = CGUtils.GetRotateAngleInRadians(from, piovt, y); float ret = rX - rY; return(ret <0f ? -1 : ret> 0f ? 1 : 0); }