Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
RealPoint constructors
/**
* Protected constructor that can re-use the passed position array.
*
* @param position
* array used to store the position.
* @param copy
* flag indicating whether to make a copy of the array.
*/
protected RealPoint( final double[] position, final boolean copy )
{
super( copy ? position.clone() : position );
}
/**
* Create a point at a definite location in a space of the dimensionality of
* the position.
*
* @param position
* the initial position. The length of the array determines the
* dimensionality of the space.
*/
public RealPoint( final double... position )
{
this( position, true );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment