Skip to content

Commit 1ecb618

Browse files
authored
Merge pull request #3045 from entrylabs/issue/10263
[#10263] 음수 정수의 소수 부분(unnatural) 계산 버그 수정
2 parents 0a35d15 + cdab1ba commit 1ecb618

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/playground/blocks/block_calc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ module.exports = {
799799
case 'unnatural': {
800800
returnVal = new BigNumber(value).minus(Math.floor(value));
801801
returnVal = returnVal.toNumber();
802-
if (value < 0) {
802+
if (value < 0 && returnVal !== 0) {
803803
returnVal = 1 - returnVal;
804804
}
805805
break;

0 commit comments

Comments
 (0)