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

Bug in temperature selection #1

Open
jalava opened this issue Sep 9, 2013 · 1 comment
Open

Bug in temperature selection #1

jalava opened this issue Sep 9, 2013 · 1 comment

Comments

@jalava
Copy link

jalava commented Sep 9, 2013

In your code you have:
temperature = temperature | 50;

Which is bitwise operation (for example temp 100 comes out as 118). You probably intended to do temperature || 50 but this doesn't work either because 0 evaluates to false and it is set to 50 again.

I would go for something like: temperature = isNaN(temperature)?50:temperature

parmentf added a commit that referenced this issue Sep 9, 2013
Thanks to @jalava, who posted issue #1.
@parmentf
Copy link
Owner

parmentf commented Sep 9, 2013

You're right.
Thanks!

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