Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rational dimensions #48

Merged
merged 12 commits into from
Jan 4, 2024
Merged

Rational dimensions #48

merged 12 commits into from
Jan 4, 2024

Conversation

Tehforsch
Copy link
Owner

@Tehforsch Tehforsch commented Dec 31, 2023

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 unsophisticated Ratio type in order not to pull in an additional dependency.

Todo:

  • add documentation for the feature

  • 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.

  • add tests to CI

  • Allow definitions to make use of the rational dimensions so we can write dimension SqrtLength = Length^(1/2)

@Tehforsch Tehforsch merged commit a38256b into main Jan 4, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant