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

small tweaks to simplify #291

Merged
merged 2 commits into from
Mar 2, 2023
Merged

small tweaks to simplify #291

merged 2 commits into from
Mar 2, 2023

Conversation

gstein
Copy link
Contributor

@gstein gstein commented Mar 1, 2023

Both floor() functions are unused, and math.ceil() is easily replaced.

gstein added 2 commits March 1, 2023 07:45
The floor() function is not used anywhere in tinytuya. Should anybody "need" this function, they really ought to use: max(n, 0)
The math.floor() function was not used. math.ceil() is easily replaced with int()
@uzlonewolf
Copy link
Collaborator

Very nice! I like the math elimination.

Looks like that floor() function used to be used in the scanner before the rewrite.

@jasonacox jasonacox merged commit c334b74 into jasonacox:master Mar 2, 2023
@jasonacox
Copy link
Owner

Thanks @gstein !

@gstein gstein deleted the tweaks branch March 2, 2023 02:36
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

Successfully merging this pull request may close these issues.

3 participants