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

Document that trigonometric expressions use radians #13405

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

wchargin
Copy link
Contributor

Style expressions like ["cos", arg] take arg in radians, and their inverses return radians. This is a reasonable choice, but in context it may be a bit surprising, since latitudes and longitudes are typically expressed in degrees. Other expressions like ["pitch"] also return degrees. This patch keeps the current behavior and describes it explicitly in the documentation.

cc @mapbox/map-design-team

wchargin-branch: docs-trig-radians

Launch Checklist

  • Make sure the PR title is descriptive and preferably reflects the change from the user's perspective.
  • Add additional detail and context in the PR description (with screenshots/videos if there are visual changes).
  • Manually test the debug page.
  • Write tests for all new functionality and make sure the CI checks pass.
  • Document any changes to public APIs.
  • Post benchmark scores if the change could affect performance.
  • Tag @mapbox/map-design-team @mapbox/static-apis if this PR includes style spec API or visual changes.
  • Tag @mapbox/gl-native if this PR includes shader changes or needs a native port.

Style expressions like `["cos", arg]` take `arg` in radians, and their
inverses return radians. This is a reasonable choice, but in context it
may be a bit surprising, since latitudes and longitudes are typically
expressed in degrees. Other expressions like `["pitch"]` also return
degrees. This patch keeps the current behavior and describes it
explicitly in the documentation.

wchargin-branch: docs-trig-radians
wchargin-source: a70bd704bb273703e4402cceec16a75742047706
@wchargin wchargin requested a review from a team as a code owner February 16, 2025 19:30
@CLAassistant
Copy link

CLAassistant commented Feb 16, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@underoot underoot left a comment

Choose a reason for hiding this comment

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

Thank you! Make sense to have mentioning of units in these specified cases

@underoot underoot merged commit 6304f71 into mapbox:main Feb 17, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants