mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-29 19:13:49 +01:00
some chagens
This commit is contained in:
parent
59100e33e0
commit
de64777c75
@ -1,6 +1,6 @@
|
||||
import { CompanyPosition } from "./CompanyPosition";
|
||||
import * as posNames from "./data/companypositionnames";
|
||||
import { favorToRep, repToFavor } from "./formulas/favor";
|
||||
import { favorToRep, repToFavor } from "../Faction/formulas/favor";
|
||||
|
||||
import { IMap } from "../types";
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
// The initial formulas was sum 0 to f of 500*1.02^f.
|
||||
// see https://en.wikipedia.org/wiki/Geometric_series#Closed-form_formula
|
||||
// for information on how to calculate this
|
||||
|
||||
export function favorToRep(f: number): number {
|
||||
const raw = 25000 * (Math.pow(1.02, f) - 1);
|
||||
return Math.round(raw * 10000) / 10000; // round to make things easier.
|
||||
}
|
||||
|
||||
export function repToFavor(r: number): number {
|
||||
const raw = Math.log(r / 25000 + 1) / Math.log(1.02);
|
||||
return Math.round(raw * 10000) / 10000; // round to make things easier.
|
||||
}
|
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -1320,7 +1320,7 @@ export interface TIX {
|
||||
/**
|
||||
* Singularity API
|
||||
* @remarks
|
||||
* This API requires Source-File 4 level 1 to use. The RAM cost of all these functions is multiplied by 16/4/1 based on Source-File 4 levels.
|
||||
* This API requires Source-File 4 to use. The RAM cost of all these functions is multiplied by 16/4/1 based on Source-File 4 levels.
|
||||
* @public
|
||||
*/
|
||||
export interface Singularity {
|
||||
|
Loading…
Reference in New Issue
Block a user