mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-14 03:33:52 +01:00
75dabd10be
Also, improve docs.
36 lines
1.6 KiB
Markdown
36 lines
1.6 KiB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [HackingFormulas](./bitburner.hackingformulas.md) > [growPercent](./bitburner.hackingformulas.growpercent.md)
|
|
|
|
## HackingFormulas.growPercent() method
|
|
|
|
Calculate the growth multiplier constant for a given server and threads.
|
|
|
|
The actual amount of money grown depends both linearly \*and\* exponentially on threads; this is only giving the exponential part that is used for the multiplier. See [grow](./bitburner.ns.grow.md) for more details.
|
|
|
|
As a result of the above, this multiplier does \*not\* depend on the amount of money on the server. Changing server.moneyAvailable and server.moneyMax will have no effect.
|
|
|
|
For the most common use-cases, you probably want either [formulas.hacking.growThreads](./bitburner.hackingformulas.growthreads.md) or [formulas.hacking.growAmount](./bitburner.hackingformulas.growamount.md) instead.
|
|
|
|
**Signature:**
|
|
|
|
```typescript
|
|
growPercent(server: Server, threads: number, player: Person, cores?: number): number;
|
|
```
|
|
|
|
## Parameters
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| server | [Server](./bitburner.server.md) | Server info, typically from [getServer](./bitburner.ns.getserver.md) |
|
|
| threads | number | Amount of threads. Can be fractional. |
|
|
| player | [Person](./bitburner.person.md) | Player info, typically from [getPlayer](./bitburner.ns.getplayer.md) |
|
|
| cores | number | _(Optional)_ Number of cores on the computer that will execute grow. |
|
|
|
|
**Returns:**
|
|
|
|
number
|
|
|
|
The calculated grow percent.
|
|
|