public static final Vector2[] cleanse(Vector2... points){
  if (points == null)   throw new NullPointerException(Messages.getString("geometry.nullPointArray"));
  List<Vector2> pointList=Arrays.asList(points);
  List<Vector2> resultList=Geometry.cleanse(pointList);
  Vector2[] result=new Vector2[resultList.size()];
  resultList.toArray(result);
  return result;
}

public static final Vector2 [ ] cleanse ( Vector2 ... points ) { if ( points == null ) throw new NullPointerException ( Messages . getString ( "geometry.nullPointArray" ) ) ; List < Vector2 > pointList = Arrays . asList ( points ) ; List < Vector2 > resultList = Geometry . cleanse ( pointList ) ; Vector2 [ ] result = new Vector2 [ resultList . size ( ) ] ; resultList . toArray ( result ) ; return result ; }
returns a new array containing the ' cleansed ' version of the given array of polygon points . < p > this method ensures the polygon has ccw winding , removes colinear vertices , and removes coincident vertices .
