/* (non-Javadoc)
@see org.joml.Matrix4dc#positiveX(org.joml.Vector3d)
430622
public Vector3d positiveX(Vector3d dest) {
        dest.x = m11 * m22 - m12 * m21;
        dest.y = m02 * m21 - m01 * m22;
        dest.z = m01 * m12 - m02 * m11;
        return dest.normalize(dest);
    }
1346594
public Vector2f normalizedPositiveY(Vector2f dir) {
        dir.x = -m10;
        dir.y =  m00;
        return dir;
    }
823278
public Vector4d negate(Vector4d dest) {
        dest.x = -x;
        dest.y = -y;
        dest.z = -z;
        dest.w = -w;
        return dest;
    }
123880
public Matrix4x3d scaleXY(double x, double y, Matrix4x3d dest) {
        return scale(x, y, 1.0, dest);
    }
1246059
public Vector3d negate(Vector3d dest) {
        dest.x = -x;
        dest.y = -y;
        dest.z = -z;
        return dest;
    }
74387
public Vector3d cross(double x, double y, double z) {
        return cross(x, y, z, thisOrNew());
    }
1253026
@Override
    public double toReal(double x) {
        double unsignedReal = FastMath.exp(natlog(x));
        return (sign(x) == POSITIVE) ? unsignedReal : -unsignedReal;
    }
776489
public Vector3i negate(Vector3i dest) {
        dest.x = -x;
        dest.y = -y;
        dest.z = -z;
        return dest;
    }
592958
public Matrix4x3d translation(Vector3dc offset) {
        return translation(offset.x(), offset.y(), offset.z());
    }
223616
public Matrix3d scale(Vector3dc xyz, Matrix3d dest) {
        return scale(xyz.x(), xyz.y(), xyz.z(), dest);
    }
1349384
public static Vector3d[] calcInvertedAxes(Vector3d aAxis, Vector3d bAxis, Vector3d cAxis) {
        double det = aAxis.x * bAxis.y * cAxis.z - aAxis.x * bAxis.z * cAxis.y - aAxis.y * bAxis.x * cAxis.z + aAxis.y
                * bAxis.z * cAxis.x + aAxis.z * bAxis.x * cAxis.y - aAxis.z * bAxis.y * cAxis.x;
        Vector3d[] invaxes = new Vector3d[3];
        invaxes[0] = new Vector3d();
        invaxes[0].x = (bAxis.y * cAxis.z - bAxis.z * cAxis.y) / det;
        invaxes[0].y = (bAxis.z * cAxis.x - bAxis.x * cAxis.z) / det;
        invaxes[0].z = (bAxis.x * cAxis.y - bAxis.y * cAxis.x) / det;

        invaxes[1] = new Vector3d();
        invaxes[1].x = (aAxis.z * cAxis.y - aAxis.y * cAxis.z) / det;
        invaxes[1].y = (aAxis.x * cAxis.z - aAxis.z * cAxis.x) / det;
        invaxes[1].z = (aAxis.y * cAxis.x - aAxis.x * cAxis.y) / det;

        invaxes[2] = new Vector3d();
        invaxes[2].x = (aAxis.y * bAxis.z - aAxis.z * bAxis.y) / det;
        invaxes[2].y = (aAxis.z * bAxis.x - aAxis.x * bAxis.z) / det;
        invaxes[2].z = (aAxis.x * bAxis.y - aAxis.y * bAxis.x) / det;
        return invaxes;
    }
71619
public static double positive(@Nullable String role, double x) {
		if (!(x > 0)) { // not x < 0, to work with NaN.
			throw new IllegalArgumentException(role + " (" + x + ") must be >= 0");
		}
		return x;
	}
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;
    }
436834
public Matrix4x3d scale(double x, double y, double z, Matrix4x3d dest) {
        if ((properties & PROPERTY_IDENTITY) != 0)
            return dest.scaling(x, y, z);
        return scaleGeneric(x, y, z, dest);
    }
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;
	}
730357
public Vector3Axis delta(Vector3f v) {
        Vector3Axis ret = new Vector3Axis(Float.NaN, Float.NaN, Float.NaN);
        if (x != Float.NaN && v.x != Float.NaN && !equal(x, v.x)) {
            ret.set(x - v.x, Layout.Axis.X);
        }
        if (y != Float.NaN && v.y != Float.NaN && !equal(y, v.y)) {
            ret.set(y - v.y, Layout.Axis.Y);
        }
        if (z != Float.NaN && v.z != Float.NaN && !equal(z, v.z)) {
            ret.set(z - v.z, Layout.Axis.Z);
        }
        return ret;
    }
799681
public Matrix4x3d reflection(Vector3dc normal, Vector3dc point) {
        return reflection(normal.x(), normal.y(), normal.z(), point.x(), point.y(), point.z());
    }