/** * <code>smallestAngleBetween</code> returns (in radians) the minimum * angle between two vectors. It is assumed that both this vector and the * given vector are unit vectors (iow, normalized). * * @param otherVector * a unit vector to find the angle against * @return the angle in radians. */ public float smallestAngleBetween(Vector2f otherVector) { float dotProduct = dot(otherVector); float angle = FastMath.acos(dotProduct); return angle; }
/** * <code>smallestAngleBetween</code> returns (in radians) the minimum * angle between two vectors. It is assumed that both this vector and the * given vector are unit vectors (iow, normalized). * * @param otherVector * a unit vector to find the angle against * @return the angle in radians. */ public float smallestAngleBetween(Vector2f otherVector) { float dotProduct = dot(otherVector); float angle = FastMath.acos(dotProduct); return angle; }
/** * <code>smallestAngleBetween</code> returns (in radians) the minimum * angle between two vectors. It is assumed that both this vector and the * given vector are unit vectors (iow, normalized). * * @param otherVector * a unit vector to find the angle against * @return the angle in radians. */ public float smallestAngleBetween(Vector2f otherVector) { float dotProduct = dot(otherVector); float angle = FastMath.acos(dotProduct); return angle; }