Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit feb47f9

Browse files
committed
Remove unused code
1 parent c3d58cd commit feb47f9

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

src/decimal128.mts

+1-13
Original file line numberDiff line numberDiff line change
@@ -1103,18 +1103,6 @@ export class Decimal128 {
11031103
return emitDecimal();
11041104
}
11051105

1106-
/**
1107-
* Return the absolute value of this Decimal128 value.
1108-
*
1109-
*/
1110-
private abs(): Decimal128 {
1111-
if (this.isNegative) {
1112-
return new Decimal128(this.toString().substring(1));
1113-
}
1114-
1115-
return this;
1116-
}
1117-
11181106
/**
11191107
* Compare two values. Return
11201108
*
@@ -1493,7 +1481,7 @@ export class Decimal128 {
14931481
}
14941482

14951483
let q = this.divide(d).round(0, ROUNDING_MODE_TRUNCATE);
1496-
return this.subtract(d.multiply(q)).abs();
1484+
return this.subtract(d.multiply(q));
14971485
}
14981486

14991487
normalize(): Decimal128 {

src/rational.mts

+1-2
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ export class Rational {
140140
}
141141

142142
private static _multiply(x: Rational, y: Rational): Rational {
143-
let neg = x.isNegative !== y.isNegative;
144143
return new Rational(
145-
(neg ? minusOne : one) * x.numerator * y.numerator,
144+
x.numerator * y.numerator,
146145
x.denominator * y.denominator
147146
);
148147
}

0 commit comments

Comments
 (0)