package de.thdeg.greiner.superpangworld.graphics.helper;

import de.thdeg.greiner.superpangworld.graphics.base.Position;

import java.util.Comparator;

/**
 * Compare two Positions regarding their x values
 */
public class XAxisComparator implements Comparator<Position> {

    @Override
    public int compare(Position o1, Position o2) {
        return (int)Math.signum(o1.x-o2.x);
    }

}
