There are an infinite number of normalized vectors orthogonal to the instance. This method picks up one of them almost arbitrarily. It is useful when one needs to compute a reference frame with one of the axes in a predefined direction. The following example shows how to build a frame having the k axis aligned with the known vector u :
Vector3D k = u.normalize(); Vector3D i = k.orthogonal(); Vector3D j = Vector3D.crossProduct(k, i);
@return a new normalized vector orthogonal to the instance
@exception ArithmeticException if the norm of the instance is null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|