A Formula for Angles Between Subspaces of Inner Product Spaces