judge a->b is ordered clockwise

@param center
@param a
@param b
@return
497855
private boolean isClockwise(Point center, Point a, Point b) {
        double cross = (a.x - center.x) * (b.y - center.y) - (b.x - center.x) * (a.y - center.y);
        return cross > 0;
    }
57956
private int edgeAngleCompare_(/* const */Edge edge1, /* const */Edge edge2) {
		if (edge1.equals(edge2))
			return 0;

		Point2D v1 = edge1.m_segment._getTangent(edge1.getReversed() ? 1.0
				: 0.0);
		if (edge1.getReversed())
			v1.negate();
		Point2D v2 = edge2.m_segment._getTangent(edge2.getReversed() ? 1.0
				: 0.0);
		if (edge2.getReversed())
			v2.negate();

		int q1 = v1._getQuarter();
		int q2 = v2._getQuarter();

		if (q2 == q1) {
			double cross = v1.crossProduct(v2);
			double crossError = 4 * NumberUtils.doubleEps()
					* (Math.abs(v2.x * v1.y) + Math.abs(v2.y * v1.x));
			if (Math.abs(cross) <= crossError) {
				cross--; // To avoid warning of "this line has no effect" from
							// cross = cross.
				cross++;
			}
			assert (Math.abs(cross) > crossError);
			return cross < 0 ? 1 : (cross > 0 ? -1 : 0);
		} else {
			return q1 < q2 ? -1 : 1;
		}
	}
1024209
function middleInside( a, b ) {

	var p = a,
		inside = false,
		px = ( a.x + b.x ) / 2,
		py = ( a.y + b.y ) / 2;

	do {

		if ( ( ( p.y > py ) !== ( p.next.y > py ) ) && p.next.y !== p.y &&
						( px < ( p.next.x - p.x ) * ( py - p.y ) / ( p.next.y - p.y ) + p.x ) ) {

			inside = ! inside;

		}

		p = p.next;

	} while ( p !== a );

	return inside;

}
205459
private int selectBest( double a , double b , double c ) {
		if( a < b ) {
			if( a < c )
				return 0;
			else
				return 2;
		} else if( b <= c ) {
			return 1;
		} else {
			return 2;
		}
	}
522477
private boolean equalShapes(Shape a, Shape b) {
		a.checkPoints();
		b.checkPoints();
		
		for (int i=0;i<a.points.length;i++) {
			if (a.points[i] != b.points[i]) {
				return false;
			}
		}
		
		return true;
	}
237193
function _sorter(a, b){
	// Use aid property priority.
	var bpri = aid.priority(b.property_id());
	var apri = aid.priority(a.property_id());
	return apri - bpri;
    }
84470
public static char median(final char a, final char b, final char c) {
        if ((a >= b && a <= c) || (a >= c && a <= b)) {
            return a;
        } else if ((b >= a && b <= c) || (b >= c && b <= a)) {
            return b;
        } else {
            return c;
        }
    }
281563
public static float median(final float a, final float b, final float c) {
        int ab = Float.compare(a, b);
        int ac = Float.compare(a, c);
        int bc = 0;

        if ((ab >= 0 && ac <= 0) || (ac >= 0 && ab <= 0)) {
            return a;
        } else if ((((bc = Float.compare(b, c)) <= 0) && ab <= 0) || (bc >= 0 && ab >= 0)) {
            return b;
        } else {
            return c;
        }
    }
187663
static boolean isBigger(Long a, Long b) {
        return a == null || (b != null && b > a);
    }
440129
public static <T extends IPositioned & ISized> IntSupplier centeredTo(ISized owner, T other, int offset)
	{
		checkNotNull(other);
		return () -> {
			return other.position().x() + (other.size().width() - owner.size().width()) / 2 + offset;
		};
	}
661251
public int compareTo(final DiffBlock b)
	{
		if (ab) {
			return this.revAStart - b.revAStart;
		}
		else {
			return this.revBStart - b.revBStart;
		}
	}
990868
function sortObjName(a, b) {
  let lenA = a.length
  let lenB = b.length
  let len = lenA > lenB ? lenB : lenA

  for (let i = 0; i < len; i++) {
    let codeA = a.charCodeAt(i)
    let codeB = b.charCodeAt(i)
    let cmpResult = cmpCode(codeA, codeB)

    if (cmpResult !== 0) return cmpResult
  }

  if (lenA > lenB) return 1
  if (lenA < lenB) return -1

  return 0
}
676709
public boolean centerWindow () {
		Group parent = getParent();
		if (parent == null) {
			centerOnAdd = true;
			return false;
		} else {
			moveToCenter();
			return true;
		}
	}
567030
def b(self):
        '''
        

        '''
        b = Point(self.center)

        if self.xAxisIsMinor:
            b.x += self.minorRadius
        else:
            b.y += self.minorRadius
        return b
1003083
public Comparator<S> comparator() {
        if (mChunkMatcher == null) {
            return mChunkSorter;
        }
        return new Comparator<S>() {
            public int compare(S a, S b) {
                int result = mChunkMatcher.compare(a, b);
                if (result == 0) {
                    result = mChunkSorter.compare(a, b);
                }
                return result;
            }
        };
    }
1171715
function _sortZ(a, b) {
         return b.pos && a.pos ? b.pos.z - a.pos.z : a.pos ? -Infinity : Infinity;
       }
927251
private static void rotate(final Vector v, final int a, final int b, final int shift) {
		final int size = b - a;
		final int r = size - shift;
		final int g = gcd(size, r);
		for (int i = 0; i < g; i++) {
			int to = i;
			final Object tmp = v.elementAt(a + to);
			for (int from = (to + r) % size; from != i; from = (to + r) % size) {
				v.setElementAt(v.elementAt(a + from), a + to);
				to = from;
			}
			v.setElementAt(tmp, a + to);
		}
	}