mirror of
https://github.com/arnaucube/circom.git
synced 2026-02-07 03:06:42 +01:00
for loops
This commit is contained in:
17
src/zqfield.js
Normal file
17
src/zqfield.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const bigInt = require("big-integer");
|
||||
|
||||
module.exports = class ZqField {
|
||||
constructor(p) {
|
||||
this.p = p;
|
||||
}
|
||||
|
||||
add(a, b) {
|
||||
return a.add(b).mod(this.p);
|
||||
}
|
||||
|
||||
lt(a, b) {
|
||||
return a.lt(b) ? bigInt(1) : bigInt(0);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user