Skip to content

Commit

Permalink
Made 1/derivRes a const
Browse files Browse the repository at this point in the history
  • Loading branch information
propfeds committed Aug 17, 2024
1 parent 2a6a231 commit 02f61bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions theory.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const scale = 4;
// All balance parameters are aggregated for ease of access

const derivRes = 100000;
const derivResInv = 1 / derivRes;

const resolution = 1/4;
// const getBlackholeSpeed = (z) => Math.min(z**2 + 0.004, resolution);
Expand Down Expand Up @@ -1226,7 +1227,7 @@ var tick = (elapsedTime, multiplier) =>

if(derivMs.level)
{
let tmpZ = zeta(t + 1 / derivRes);
let tmpZ = zeta(t + derivResInv);
let dr = tmpZ[0] - zResult[0];
let di = tmpZ[1] - zResult[1];
dTerm = BigNumber.from(Math.sqrt(dr*dr + di*di) * derivRes);
Expand Down Expand Up @@ -1255,7 +1256,7 @@ var tick = (elapsedTime, multiplier) =>

// Calculate bhzTerm
zResult = zeta(t);
let tmpZ = zeta(t + 1 / derivRes);
let tmpZ = zeta(t + derivResInv);
let dr = tmpZ[0] - zResult[0];
let di = tmpZ[1] - zResult[1];
bhdTerm = BigNumber.from(Math.sqrt(dr*dr + di*di) *
Expand Down

0 comments on commit 02f61bb

Please sign in to comment.