mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-02-16 18:12:24 +01:00
Fix hackAnalyzeThreads
It was previously returning infinity any time a single thread was calculated to hack less than $1, due to an improper use of Math.floor.
This commit is contained in:
@ -176,7 +176,7 @@ export const ns: InternalAPI<NSFull> = {
|
||||
return 0; // To prevent returning infinity below
|
||||
}
|
||||
|
||||
return hackAmount / Math.floor(server.moneyAvailable * percentHacked);
|
||||
return hackAmount / server.moneyAvailable * percentHacked;
|
||||
},
|
||||
hackAnalyze: (ctx) => (_hostname) => {
|
||||
const hostname = helpers.string(ctx, "hostname", _hostname);
|
||||
|
Reference in New Issue
Block a user