Vec2f Vec2f::project(const Vec2f &other) const { return (dot(other) / other.magnitudeSquared()) * other; }