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

print_num(x) function should cast its argument to an int #17

Open
cmwedin opened this issue Jun 30, 2021 · 1 comment
Open

print_num(x) function should cast its argument to an int #17

cmwedin opened this issue Jun 30, 2021 · 1 comment

Comments

@cmwedin
Copy link

cmwedin commented Jun 30, 2021

This is a very minor issue and very easy to change on your own, so i understand if it isn't a priority, but it would make sense to want to print out a float in text as the closest integer. As it stands float arguments will be accepted but not print properly for inputs higher than 20 as integer division isn't used in the conditional.

@joningold
Copy link
Member

Good idea! We're actually rolling this function into inky's "ink snippets" menu in the next version, so I'll include this tweak there. (This repo is becoming somewhat redundant now ink has an internal library.)

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