/* PUBLIC MEMBER FUNCTIONS */ float Vector2f::getAngle(const Vector2f &v) const { // WARNING: this may not work float length = (getMagnitude() * v.getMagnitude()); if (length == 0.0f) { return 0.0f; } return (float)acos(getDotProduct(v) / length); }
float Vector2f::getScaleFactor(const Vector2f &v) const { return getMagnitude() / v.getMagnitude(); }