mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 23:47:33 +08:00
use truncation instead of rounding down or rounding to the nearest value when numerical calculations exceed precision limits
This commit is contained in:
@@ -325,7 +325,7 @@ function confirm(): boolean {
|
||||
finalValue = previous - current;
|
||||
break;
|
||||
case '×':
|
||||
finalValue = Math.round(previous * current / 100);
|
||||
finalValue = Math.trunc(previous * current / 100);
|
||||
break;
|
||||
default:
|
||||
finalValue = previous;
|
||||
|
||||
Reference in New Issue
Block a user