I'd love some feedback on my calculator!

Any feedback is greatly appreciated!

My main goal on this project was to ensure that my rounding function worked. I wanted a specific number of digits in the output, while taking care of floating point issues, and removing excess zeros. If there are any bugs with this in particular, I’d love to know!

Thanks!

I like the how all the buttons are set on a plain background then you add the hover effect. it would be cool if there was a little visual with the click event. it seems to function well. one thing i did notice is when I key in 5+55 I get 50 for an answer. I should get 30. If I enter 55+5 I get 30. the order of operations is not right. it is just doing one at a time left to right instead of evaluating the whole expression. .

EDIT:

@montycantsin is right a normal calculator doesn’t do what I am saying. i stand corrected and take back my criticism above. and i learned something about calculators.

hi!

UI looks great. very sleek.

the calculator breaks if you hit the operator multiple times after an operation.

try 3 + 3 + + + + +. breaks similarly with the other operations as well.

to be fair, no simple calculator i’ve ever used has allowed for multiple operations that take the order of operations into consideration. only my graphing calculators have had that functionality.

not even the stock calculator with windows allows for that

Thanks for the feedback! I added a subtle shadow on button click. I decided not to string together functions and, instead, have the operators complete previous calculations when they are clicked. This is more inline with basic calculators. If I went the order of operations route, I would feel compelled to add much more complicated functions to the calculator, which I felt was beyond the scope of the project.

Thanks again!

Hi! Thanks for the feedback!

I fixed the multiple operator issue. That came about from my addition of repeating the most recent operation when the equals button is clicked.

awesome! looks good. can’t find any other bugs ^^

keep up the good work!

edit: oh, when i did the calculator, one person asked if i could add keyboard support. sure it’s optional, but definitely a nice feature for a calculator. up to you if you wanna code that in