mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 14:12:27 +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:
parent
2f4c29fdf0
commit
45ca94b1dc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user