/** * Creates an identity matrix. */ public Matrix3 () { setToIdentity(); }
/** * Creates an identity matrix. */ public Matrix3 () { setToIdentity(); }
/** * Sets this to a rotation matrix that rotates one vector onto another. * * @return a reference to this matrix, for chaining. */ public Matrix3 setToRotation (IVector3 from, IVector3 to) { float angle = from.angle(to); return (angle < 0.0001f) ? setToIdentity() : setToRotation(angle, from.cross(to).normalizeLocal()); }
/** * Sets this to a rotation matrix that rotates one vector onto another. * * @return a reference to this matrix, for chaining. */ public Matrix3 setToRotation (IVector3 from, IVector3 to) { float angle = from.angle(to); return (angle < 0.0001f) ? setToIdentity() : setToRotation(angle, from.cross(to).normalizeLocal()); }