Repository navigation
feat(converter): add support for Angle type to Logarithm - #3681
Krish2882005 wants to merge 1 commit into
Conversation
Summary of ChangesHello @Krish2882005, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Logarithm value node by introducing support for Angle data types. Previously limited to Real values, the converter now intelligently handles Angle inputs by converting them to radians for computation and then back to Angle for the result. This change broadens the utility of the Logarithm node within the system and includes updated documentation for clarity. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Thank you for contributing! ✨ New Features
|
There was a problem hiding this comment.
Code Review
The pull request successfully extends the Logarithm converter to support Angle inputs, which is a valuable enhancement. The changes correctly integrate Angle type handling by converting values to radians for internal calculations and back to Angle for output. The addition of class documentation is also a positive improvement. However, there is a critical logical error in the ValueNode_Logarithm constructor that causes the node to return the input value rather than its logarithm.
|
OK, the code works but why are we using 1 radian as a base for logarithm instead of 'e'? Is there some meaning to this I am unaware of? |
|
Hey @Svarov-RZM, thanks for taking a look! There seems to be a confusion here. The log() function actually defaults to base e. The code just converts the angle into radians so it can be passed into log(). 1 radian isn't acting as the base here. |

Supersedes #3607
Closes #3582
The Logarithm converter previously only accepted
Realvalues. This PR extends it to supportAngleinputs.Changes:
check_typeto accepttype_angle.operator()to convertAngleinputs to radians (Real) before calculation, then convert the result back toAngleif necessary.valuenode_log.h.