feat: Update dependencies and improve formatting for Cartesian and Sp…#8
Merged
feat: Update dependencies and improve formatting for Cartesian and Sp…#8
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a significant enhancement to the formatting capabilities of coordinate and vector types throughout the codebase. The main focus is to ensure that all coordinate types (
XYZ,Direction,Position,Vector) properly respect Rust's formatting traits (Display,LowerExp,UpperExp), allowing users to customize string representations (e.g., precision, scientific notation) consistently. Additionally, tests have been added to verify these behaviors, and a dependency update is included.Formatting improvements for coordinate and vector types:
Implemented
LowerExpandUpperExpformatting traits forXYZ<T>,Direction<F>,Position<C, F, U>, andVector<F, U>, ensuring that all types now respect precision and scientific notation format specifiers in their string outputs. (src/cartesian/xyz.rs,src/cartesian/direction.rs,src/cartesian/position.rs,src/cartesian/vector.rs,src/ellipsoidal/position.rs,src/spherical/direction.rs,src/spherical/position.rs) [1] [2] [3] [4] [5] [6] [7]Refactored
Displayimplementations for all coordinate types to use generic formatting, instead of hardcoded precision, for improved flexibility and consistency. (src/cartesian/xyz.rs,src/cartesian/direction.rs,src/cartesian/position.rs,src/cartesian/vector.rs,src/ellipsoidal/position.rs,src/spherical/direction.rs,src/spherical/position.rs) [1] [2] [3] [4] [5] [6] [7]Testing enhancements:
src/cartesian/xyz.rs,src/cartesian/direction.rs,src/cartesian/position.rs,src/cartesian/vector.rs,src/ellipsoidal/position.rs,src/spherical/direction.rs,src/spherical/position.rs) [1] [2] [3] [4] [5] [6] [7]Dependency and workspace updates:
qttydependency from version0.3.0to0.4.0inCargo.toml, and added a[workspace]section for workspace support. [1] [2]Minor code cleanup:
affn-derive/src/lib.rsby replacing a match statement with anif letconstruct. [1] [2]These changes make the codebase more robust and user-friendly by allowing flexible formatting of coordinate and vector types, improving test coverage, and keeping dependencies up to date.