Created
March 21, 2012 04:16
-
-
Save ctrueden/2144264 to your computer and use it in GitHub Desktop.
RealPoint constructors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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