...
changes the array which is now referenced internally by the class containing setReferencePoint
. It is probably better practice to internally clone the array, for example:
Code Block | ||
---|---|---|
| ||
public void setReferencePoint(double[] point){
_refPoint = point.clone();
}
|
or to make sure the documentation to setReferencePoint
explains that it will hold a reference to the array and the user should not modify it.
...