/* (non-Javadoc)
@see org.joml.Matrix4dc#normalizedPositiveZ(org.joml.Vector3d)
330453
public Vector3d normalizedPositiveZ(Vector3d dest) {
        dest.x = m02;
        dest.y = m12;
        dest.z = m22;
        return dest;
    }
238827
public Matrix4d reflection(Vector3dc normal, Vector3dc point) {
        return reflection(normal.x(), normal.y(), normal.z(), point.x(), point.y(), point.z());
    }
799681
public Matrix4x3d reflection(Vector3dc normal, Vector3dc point) {
        return reflection(normal.x(), normal.y(), normal.z(), point.x(), point.y(), point.z());
    }
855600
def normalize(self):
        """"""
        vlength = self.length()

        # Make sure the length isn't 0
        if vlength > 0:
            self.x /= vlength
            self.y /= vlength
            self.z /= vlength
            self.w /= vlength
        else:
            return Vector4(0, 0, 0, 0)
783628
public static boolean isDiagonalPositive( DMatrixRMaj a ) {
        for( int i = 0; i < a.numRows; i++ ) {
            if( !(a.get(i,i) >= 0) )
                return false;
        }
        return true;
    }
660888
public Vector3D getVertex(int i) {
        tmpV.setX(x.get(i));
        tmpV.setY(y.get(i));
        tmpV.setZ(z.get(i));

        calcG();
        return tmpV;
    }
490604
public Vector2d normalizedPositiveY(Vector2d dir) {
        dir.x = -m10;
        dir.y =  m00;
        return dir;
    }
1348646
private static Geometry force3DStartEnd(LineString lineString, final double startZ,
            final double endZ, final boolean interpolate) {
        final double bigD = lineString.getLength();
        final double z = endZ - startZ;
        final Coordinate coordEnd = lineString.getCoordinates()[lineString.getCoordinates().length - 1];
        lineString.apply(new CoordinateSequenceFilter() {
            boolean done = false;

            @Override
            public boolean isGeometryChanged() {
                return true;
            }

            @Override
            public boolean isDone() {
                return done;
            }

            @Override
            public void filter(CoordinateSequence seq, int i) {
                double x = seq.getX(i);
                double y = seq.getY(i);
                if (i == 0) {
                    seq.setOrdinate(i, 0, x);
                    seq.setOrdinate(i, 1, y);
                    seq.setOrdinate(i, 2, startZ);
                } else if (i == seq.size() - 1) {
                    seq.setOrdinate(i, 0, x);
                    seq.setOrdinate(i, 1, y);
                    seq.setOrdinate(i, 2, endZ);
                } else {
                    if (interpolate) {
                        double smallD = seq.getCoordinate(i).distance(coordEnd);
                        double factor = smallD / bigD;
                        seq.setOrdinate(i, 0, x);
                        seq.setOrdinate(i, 1, y);
                        seq.setOrdinate(i, 2, startZ + (factor * z));
                    }
                }
                if (i == seq.size()) {
                    done = true;
                }
            }
        });
        return lineString;
    }
508477
public float getNormalZ(int vertex) {
        if (!hasNormals()) {
            throw new IllegalStateException("mesh has no normals");
        }
        
        checkVertexIndexBounds(vertex);
        
        return m_normals.getFloat((vertex * 3 + 2) * SIZEOF_FLOAT);
    }
1246059
public Vector3d negate(Vector3d dest) {
        dest.x = -x;
        dest.y = -y;
        dest.z = -z;
        return dest;
    }
1131938
public void setLinearFactor(float x, float y, float z) {
        Native3DRigidBody.setLinearFactor(getNative(), x, y, z);
    }
1105729
public Vector3D getVertex(int index) {
        tmpV.setX(cornerX.get(index));
        tmpV.setY(cornerY.get(index));
        tmpV.setZ(cornerZ.get(index));
        calcG();
        return tmpV;
    }
967185
function _Vector3(x, y, z) {
  if(!x) x = 0;
  if(!y) y = 0;
  if(!z) z = 0;

  var values = [x, y, z];
  Vector.apply(this, [3, values]);

  readonly(this, "x", x);
  readonly(this, "y", y);
  readonly(this, "z", z);
  readonly(this, "homogeneous", _getHomogeneous(this));
  readonly(this, "vector4", _getVector4(this));
}
978289
@Override
	public Point3D getXYZ(int index) {
		if (index < 0 || index >= getPointCount())
			throw new IndexOutOfBoundsException();

		_verifyAllStreams();
		AttributeStreamOfDbl v = (AttributeStreamOfDbl) m_vertexAttributes[0];
		Point3D pt = new Point3D();
		pt.x = v.read(index * 2);
		pt.y = v.read(index * 2 + 1);

		// TODO check excluded if statement componenet
		if (hasAttribute(Semantics.Z))// && (m_vertexAttributes[1] != null))
			pt.z = m_vertexAttributes[1].readAsDbl(index);
		else
			pt.z = VertexDescription.getDefaultValue(Semantics.Z);

		return pt;
	}
1342811
public double norm_vector(double[] z) {
    double sum = 0;

    for (int i = 0; i < problem.getNumberOfObjectives(); i++) {
      sum += z[i] * z[i];
    }

    return Math.sqrt(sum);
  }
887700
public Vector3d positiveZ(Vector3d dest) {
        dest.x = m10 * m21 - m11 * m20;
        dest.y = m20 * m01 - m21 * m00;
        dest.z = m00 * m11 - m01 * m10;
        return dest.normalize(dest);
    }
241049
public Vector3d set(Vector2fc v, double z) {
        return set(v.x(), v.y(), z);
    }