File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -165,9 +165,9 @@ export class Epoch extends mol.Entity.Base<EpochLike, Epoch>() {
165165 * representation: (number * length + index) scaled by the other's length.
166166 *
167167 * @param other - EpochLike value to compare against.
168- * @returns positive if this > other, 0 if equal, negative if this < other.
168+ * @returns 1 if this > other, 0 if equal, -1 if this < other.
169169 */
170- compare ( other : EpochLike ) : number {
170+ compare ( other : EpochLike ) : 1 | 0 | - 1 {
171171 if ( this === other ) {
172172 return 0 ;
173173 }
@@ -176,7 +176,7 @@ export class Epoch extends mol.Entity.Base<EpochLike, Epoch>() {
176176 const a = ( this . number * this . length + this . index ) * other_ . length ;
177177 const b = ( other_ . number * other_ . length + other_ . index ) * this . length ;
178178
179- return Number ( a - b ) ;
179+ return a > b ? 1 : a < b ? - 1 : 0 ;
180180 }
181181
182182 /**
You can’t perform that action at this time.
0 commit comments