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

Use float instead of double by default #17100

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Use float instead of double by default #17100

merged 2 commits into from
Apr 23, 2024

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Apr 22, 2024

While double is probably generally preferable for UI code,
our application is essentially a complex wrapper wrapper around
DWrite, D2D and D3D, all of which use float exclusively.

Of course it also uses XAML, but that one uses float for roughly
1/3rd of its API functions, so I'm not sure what it prefers.
Additionally, it's mostly a coincidence that we use WinUI/XAML for
Windows Terminal whereas DWrite/D2D/D3D are effectively essential.
This is demonstrated by the fact that we have a HwndTerminal,
while there's no alternative to e.g. D3D on Windows.

The goal of this PR is that DIP based calculations never end up
mixing float and double. This PR also changes opacity-related
values to float because I felt like that fits the theme.

@lhecker lhecker added the Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. label Apr 22, 2024
@DHowett DHowett enabled auto-merge April 22, 2024 22:57
@DHowett DHowett added this pull request to the merge queue Apr 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 22, 2024
@DHowett DHowett added this pull request to the merge queue Apr 23, 2024
Merged via the queue into main with commit 99061ee Apr 23, 2024
20 checks passed
@DHowett DHowett deleted the dev/lhecker/floats branch April 23, 2024 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants