You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: Add atan2 support for value type Real - #3542
The value type "Real" doesn't have atan2 as a convert type. This PR introduces atan2 conversion of "Real" values, so that the Bone Angle → Real → Angle conversion can be achieved, as requested in the issue #3528 . Fixes#3528
Thank you for contributing! Below is how your contribution will appear in Synfig's release notes. Review it and improve your pull request's title and description so that your contribution is clear. You can add images, videos, and anything else you want. Have fun!
✨ New Features
Add atan2 support for value type Real
The value type "Real" doesn't have atan2 as a convert type. This PR introduces atan2 conversion of "Real" values, so that the Bone Angle → Real → Angle conversion can be achieved, as requested in the issue #3528 .
Fixes #3528
The reason for real number can't be converted via atan2() is that atan2() is supposed to return an angle, as it means "arctangent" (i.e. arc/angle that gives such tangent).
You should do the Real -> Angle converter, but I still don't know what it is supposed to do with this conversion.
I agree, Real → Angle doesn't make sense. But the user is trying to achieve this: Bone Angle → Real → Angle.
Right now, the converter atan2() can be connected to angle-valued parameters. But the user wants to convert "angle" to "real" first and then convert to atan2() .
When atan() is used on "Real" value type, it is treated as if it is a value of an angle in degrees. And then, the operations that are done are the same as when atan2() is used on "angle" value type.
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
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.
The value type "Real" doesn't have atan2 as a convert type. This PR introduces atan2 conversion of "Real" values, so that the Bone Angle → Real → Angle conversion can be achieved, as requested in the issue #3528 .
Fixes #3528