Go to file
Sergii Piatakov b7e7566c43
squashing two commits together
---- Commit 1 ----
improve calculation accuracy

Allow using float point arguments to avoid truncation.

Test: Add (4.9, 4.9) should return 10.
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>

---- Commit 2 ----
fix truncation error

To convert float to integer the truncation is performed, but the
rounding is expected.

Test: Add (4.9, 4.9) should return 10.
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>

Signed-off-by: IO-23 Oleh Shmuliar <hasslesstech@tutanota.com>
2024-10-07 19:12:20 +03:00
calculator.cpp squashing two commits together 2024-10-07 19:12:20 +03:00
calculator.h squashing two commits together 2024-10-07 19:12:20 +03:00