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

Consider output format for mappings #11

Open
CorvusPrudens opened this issue Nov 24, 2021 · 1 comment
Open

Consider output format for mappings #11

CorvusPrudens opened this issue Nov 24, 2021 · 1 comment

Comments

@CorvusPrudens
Copy link
Collaborator

Since the intended uses for the generated code is not only PD, it's not necessary (and maybe undesirable) to convert everything to a float.

@stephenhensley
Copy link
Contributor

Not a bad idea.

I've seen a few other generator-friendly glue code that's got a bunch of functions for different types -- i.e. AsFloat() asInt() asString(), etc.

Afaik most things already cast to float without too much issue (i.e. Switch::Pressed() can be cast to float and it should resolve to 0/1), and for actual use within c++, it is still preferable from a performance perspective to work with integer types where possible.

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

No branches or pull requests

2 participants