This adds the rational-dimensions feature to use rational dimensions instead of just integer dimensions. Comes along with some minor code cleanups. I added my own very unsophisticated Ratio type in order not to pull in an additional dependency.
Todo:
[x] add documentation for the feature
[x] write better tests (ideally with a useful example)
[ ] think about how to improve compiler error messages. Probably rewriting the Ratio struct to a tuple struct with two entries will already improve things.
[x] add tests to CI
[x] Allow definitions to make use of the rational dimensions so we can write dimension SqrtLength = Length^(1/2)
Solves #25
This adds the
rational-dimensions
feature to use rational dimensions instead of just integer dimensions. Comes along with some minor code cleanups. I added my own very unsophisticatedRatio
type in order not to pull in an additional dependency.Todo:
[x] add documentation for the feature
[x] write better tests (ideally with a useful example)
[ ] think about how to improve compiler error messages. Probably rewriting the
Ratio
struct to a tuple struct with two entries will already improve things.[x] add tests to CI
[x] Allow definitions to make use of the rational dimensions so we can write
dimension SqrtLength = Length^(1/2)