Skip to content

Commit 0c3bc15

Browse files
make-github-pseudonymous-againAurélien Ooms
authored and
Aurélien Ooms
committed
🐛 fix: Use correct API method.
1 parent 16a92d9 commit 0c3bc15

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/Integer.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { DEFAULT_DISPLAY_BASE , ZeroDivisionError } from './' ;
33
import {
44
stringify , convert , _trim_positive ,
55
_alloc , _copy , _zeros ,
6-
_jz , _cmp , _eq ,
6+
jz , cmp , eq ,
77
add , _sub , mul , _idivmod , _pow_double ,
8-
_increment ,
8+
increment ,
99
} from '@aureooms/js-integer-big-endian' ;
1010

1111
export class Integer {
@@ -103,7 +103,7 @@ export class Integer {
103103

104104
if ( bi >= bj ) return this.copy() ;
105105

106-
if ( _cmp( a , ai , aj , b , bi , bj ) < 0 ) {
106+
if ( cmp( a , ai , aj , b , bi , bj ) < 0 ) {
107107

108108
const c = _zeros( bj - bi ) ;
109109

@@ -237,12 +237,12 @@ export class Integer {
237237
const Q = new Integer( r , quotient_is_negative , q ) ; // quotient
238238
const R = new Integer( r , 0 , D ) ; // remainder
239239

240-
if ( (this.is_negative || other.is_negative ) && !_jz( D , 0 , D.length ) ) {
240+
if ( (this.is_negative || other.is_negative ) && !jz( D , 0 , D.length ) ) {
241241

242242
if ( other.is_negative ) {
243243

244244
if ( !this.is_negative ) {
245-
_increment( r , q , 0 , q.length ) ;
245+
increment( r , q , 0 , q.length ) ;
246246
R.iadd( other ) ; // TODO optimize
247247
}
248248

@@ -253,7 +253,7 @@ export class Integer {
253253
}
254254

255255
else {
256-
_increment( r , q , 0 , q.length ) ;
256+
increment( r , q , 0 , q.length ) ;
257257
R.negate().iadd( other ) ; // TODO optimize
258258
}
259259

@@ -277,12 +277,12 @@ export class Integer {
277277
}
278278

279279
iszero ( ) {
280-
return _jz( this.limbs , 0 , this.limbs.length ) ;
280+
return jz( this.limbs , 0 , this.limbs.length ) ;
281281
}
282282

283283
isone ( ) {
284284
if ( this.is_negative ) return false ;
285-
return _eq( this.limbs , 0 , this.limbs.length , [ 1 ] , 0 , 1 ) ;
285+
return eq( this.limbs , 0 , this.limbs.length , [ 1 ] , 0 , 1 ) ;
286286
}
287287

288288
nonzero ( ) {
@@ -333,7 +333,7 @@ export class Integer {
333333
const a = this.limbs ;
334334
const b = other._limbs_in_base( this.base ) ;
335335

336-
return _cmp( a , 0 , a.length , b , 0 , b.length ) ;
336+
return cmp( a , 0 , a.length , b , 0 , b.length ) ;
337337

338338
}
339339

0 commit comments

Comments
 (0)