Replace exp with 0 everywhere, and remove it

This lets us remove a ton of special-casing throughout the codebase, and
just generally makes things a lot simpler.

We also remove the ability to take rational powers of `ratio`, including
`sqrt` and `cbrt` helpers, because these are intrinsically ill-defined.

Fixes #369.
This commit is contained in:
Chip Hogg
2022-07-20 00:52:37 +00:00
parent 6a9dcb30de
commit 7fd6913b73
7 changed files with 28 additions and 270 deletions
+1 -4
View File
@@ -94,10 +94,7 @@ void unknown_dimensions()
std::cout << si_fps_area << "\n";
}
std::ostream& operator<<(std::ostream& os, const ratio& r)
{
return os << "ratio{" << r.num << ", " << r.den << ", " << r.exp << "}";
}
std::ostream& operator<<(std::ostream& os, const ratio& r) { return os << "ratio{" << r.num << ", " << r.den << "}"; }
template<Unit U>
std::ostream& operator<<(std::ostream& os, const U& u)