Skip to content

Commit 68b7787

Browse files
committed
Move out constants from tick function;
1 parent 98822bb commit 68b7787

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Theories/CTs/MF.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ const mu0 = 4e-7 * Math.PI
4747
const q0 = 1.602e-19
4848
const i0 = 1e-15
4949
const m0 = 1e-3
50+
const q0_m0_mu0 = (q0/m0) * mu0
51+
const l10_q0_m0_mu0 = l10(q0_m0_mu0);
5052

5153
class mfSim extends theoryClass<theory> {
5254
lastC1: number;
@@ -385,7 +387,7 @@ class mfSim extends theoryClass<theory> {
385387
this.i = Math.min(this.i, icap);
386388

387389
const xterm = l10(this.x) * this.precomp_xexp
388-
const omegaterm = (l10((q0/m0) * mu0 * this.i) + this.variables[4].value) * this.precomp_omegaexp
390+
const omegaterm = (l10_q0_m0_mu0 + l10(this.i) + this.variables[4].value) * this.precomp_omegaexp
389391
const vterm = this.milestones[0] ? l10(this.vtot) * this.precomp_vexp : 0;
390392

391393
// this.variables[0].value == vc1

0 commit comments

Comments
 (0)