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

Angle datatype stores now only radians #6916

Merged
merged 12 commits into from
Jul 17, 2024
Merged

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Jul 16, 2024

What

Previously, Angle was an arrow union between radian & degree. As part of the effort of simplifying our data representations, this is now always just radians.
Ran into a nameclash for C++'s Angle class and had to resort to a new attribute that allows renaming the field for C++ only.

Simplifies the Angle datatype to only store radians.
As far as I can tell I managed to do this in a way that should break almost no existing usage (ignoring deprecation warnings)

Checklist

  • "passes" main test
  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@Wumpf Wumpf added 🍏 primitives Relating to Rerun primitives include in changelog 🪵 Log & send APIs Affects the user-facing API for all languages labels Jul 16, 2024
@Wumpf Wumpf force-pushed the andreas/angle-always-radians branch from 6608614 to 7493b56 Compare July 16, 2024 15:52
@Wumpf Wumpf force-pushed the andreas/angle-always-radians branch from 7493b56 to 7eedbd6 Compare July 16, 2024 15:53
Copy link

github-actions bot commented Jul 16, 2024

Deployed docs

Commit Link
e4b8a48 https://landing-n4tnmwebk-rerun.vercel.app/docs

@teh-cmc teh-cmc self-requested a review July 17, 2024 07:53
crates/build/re_types_builder/src/codegen/cpp/mod.rs Outdated Show resolved Hide resolved
/// Angle in degrees. One turn is equal to 360 degrees.
/// \py Only one of `degrees` or `radians` should be set.
Degrees: rerun.datatypes.Float32 (transparent),
radians: float (order: 100, "attr.cpp.prefix_field");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this PR but I'm surprised we didn't go for double precision here 🤔

docs/content/reference/migration/migration-0-18.md Outdated Show resolved Hide resolved
docs/snippets/snippets.toml Outdated Show resolved Hide resolved
@Wumpf
Copy link
Member Author

Wumpf commented Jul 17, 2024

@rerun-bot full-check

Copy link

@Wumpf Wumpf merged commit 7176015 into main Jul 17, 2024
71 of 74 checks passed
@Wumpf Wumpf deleted the andreas/angle-always-radians branch July 17, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 🪵 Log & send APIs Affects the user-facing API for all languages 🍏 primitives Relating to Rerun primitives
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants