Skip to content

Commit

Permalink
Use new overclock exponent.
Browse files Browse the repository at this point in the history
  • Loading branch information
KirkMcDonald committed Oct 3, 2024
1 parent c38483a commit 37ee79b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export let DEFAULT_PURITY = resourcePurities[1]

export let DEFAULT_BELT = "belt1"

const OVERCLOCK_POWER_EXPONENT = Math.log2(2.5)

class FactorySpecification {
constructor() {
// Game data definitions
Expand Down Expand Up @@ -404,7 +406,7 @@ class FactorySpecification {
// to the range [1.0, 2.5], any imprecision introduced by this
// approximation is minimal (and is probably less than is present
// in the game itself).
let overclockFactor = Rational.from_float(Math.pow(overclock.toFloat(), 1.6))
let overclockFactor = Rational.from_float(Math.pow(overclock.toFloat(), OVERCLOCK_POWER_EXPONENT))
average = average.mul(overclockFactor)
peak = peak.mul(overclockFactor)
}
Expand Down

0 comments on commit 37ee79b

Please sign in to comment.