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

Provide calculator output in hex (and other bases) #25925

Open
jrozner opened this issue May 10, 2023 · 4 comments
Open

Provide calculator output in hex (and other bases) #25925

jrozner opened this issue May 10, 2023 · 4 comments
Labels
Idea-Enhancement New feature or request on an existing product Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Run-Plugin Things that relate with PowerToys Run's plugin interface Status-In progress This issue or work-item is under development

Comments

@jrozner
Copy link

jrozner commented May 10, 2023

Description of the new feature / enhancement

Currently hex can be provided as input for the calculator but the resulting values are always in decimal. It would be nice to be able to specify the output base.

Scenario when this would be used?

When doing math on values in other bases, it's usually more meaningful to look at the resulting value in the same base as the original values or a specified one.

Supporting information

No response

@jrozner jrozner added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label May 10, 2023
@htcfreek
Copy link
Collaborator

htcfreek commented Oct 7, 2023

@ohn0
Feel free to work on this. Your contribution is welcome. Thank you for your work on this.

@ohn0
Copy link

ohn0 commented Oct 7, 2023

Alright I'll take this and work on it, thanks!

@htcfreek htcfreek added Idea-Enhancement New feature or request on an existing product Status-In progress This issue or work-item is under development Run-Plugin Things that relate with PowerToys Run's plugin interface labels Oct 7, 2023
@Jay-o-Way
Copy link
Collaborator

Hi @ohn0. What would be your planned solution?

@ohn0
Copy link

ohn0 commented Nov 19, 2023

@Jay-o-Way

After looking at how the CalculateEngine performs the computation, I think it's done by adding a method to CalculateHelper that takes the expression and parses it for the base of the expression, if there is a common base (0x10 + 0x10 + 0x10). If the user sends in input with a mixed set of bases, I'd say just return the result in base 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Idea-Enhancement New feature or request on an existing product Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Run-Plugin Things that relate with PowerToys Run's plugin interface Status-In progress This issue or work-item is under development
Projects
None yet
Development

No branches or pull requests

4 participants