public static final double [ ] toArray ( Point ... points ) { double [ ] res = new double [ 2 * points . length ] ; int idx = 0 ; for ( Point pp : points ) { res [ idx ++ ] = pp . getX ( ) ; res [ idx ++ ] = pp . getY ( ) ; } return res ; }
Creates an array for points p1 p2 ...