float float4::AngleBetween3(const float4 &other) const { float cosa = Dot3(other) / sqrt(LengthSq3() * other.LengthSq3()); if (cosa >= 1.f) return 0.f; else if (cosa <= -1.f) return pi; else return acos(cosa); }
float float4::AngleBetween4(const float4 &other) const { return acos(Dot4(other)) / sqrt(LengthSq3() * other.LengthSq3()); }