Skip to content

Commit

Permalink
Merge pull request #18 from propfeds/dev
Browse files Browse the repository at this point in the history
v0.4.1
  • Loading branch information
propfeds authored Oct 17, 2023
2 parents f813176 + 12e8558 commit 5f5357d
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions theory.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ var authors = 'propfeds, Eylanding\nMartin_mc, previous maintainer\n\n' +
'for teaching the ancient Sim language\nSneaky, Gen & Gaunter, for maths ' +
'consultation & other suggestions\n\nTranslations:\nOmega_3301 - 简体中文、' +
'繁體中文\nJooo#0529 - Español\npropfeds - Tiếng Việt';
var version = 0.4;
var version = 0.41;

const versionName = 'v0.4';
const versionName = 'v0.4.1';
const workInProgress = false;

let terms = 0;
Expand Down Expand Up @@ -120,8 +120,8 @@ const scale = 4;

const derivRes = 100000;

const resolution = 4;
const getBlackholeSpeed = (z) => Math.min(z**2 + 0.004, 1/resolution);
const resolution = 1/4;
const getBlackholeSpeed = (z) => Math.min(z**2 + 0.004, resolution);

const c1ExpMaxLevel = 3;
// The first 3 zeta zeroes lol
Expand Down Expand Up @@ -503,7 +503,8 @@ let zetaSmall = (t) =>
let offset = fullIndex - index;
let re = zeta01Table[index][0]*(1-offset) + zeta01Table[index+1][0]*offset;
let im = zeta01Table[index][1]*(1-offset) + zeta01Table[index+1][1]*offset;
return [re, im, Math.sqrt(re*re + im*im)];
return [re, im, -Math.sqrt(re*re + im*im)];
// Minus sign for the last element because of theta polarity
}

let even = (n) =>
Expand Down Expand Up @@ -706,7 +707,7 @@ let zeta = (T) =>
z = [
a[0]*(1-offset) + b[0]*offset,
a[1]*(1-offset) + b[1]*offset,
a[2]*(1-offset) + Math.abs(b[2])*offset
a[2]*(1-offset) + b[2]*offset
];
}
if(T < 0)
Expand Down Expand Up @@ -947,7 +948,7 @@ var init = () =>
foundZero = false;
bhzTerm = null;
bhdTerm = null;
if(lastZero)
if(lastZero >= 14)
t = lastZero;
}
blackholeMs.refunded = (_) =>
Expand Down Expand Up @@ -989,7 +990,7 @@ var tick = (elapsedTime, multiplier) =>
pubTime += elapsedTime;
if(!blackholeMs.level || t < 14)
{
t_dot = 1 / resolution;
t_dot = resolution;
t += t_dot * elapsedTime;
}

Expand Down Expand Up @@ -1024,7 +1025,7 @@ var tick = (elapsedTime, multiplier) =>
// Not very accurate this way but eh (xdd)
if(searchingRewind && bhdt < 0)
{
t_dot = 1 / resolution;
t_dot = resolution;
t += t_dot * elapsedTime;
}
else
Expand Down Expand Up @@ -1250,6 +1251,8 @@ var postPublish = () =>
lastZero = 0;
searchingRewind = false;
foundZero = false;
bhzTerm = null;
bhdTerm = null;

theory.invalidatePrimaryEquation();
theory.invalidateSecondaryEquation();
Expand Down

0 comments on commit 5f5357d

Please sign in to comment.