mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
43 lines
1.3 KiB
Markdown
43 lines
1.3 KiB
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|||
|
|
|||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [growthAnalyze](./bitburner.ns.growthanalyze.md)
|
|||
|
|
|||
|
## NS.growthAnalyze() method
|
|||
|
|
|||
|
This function returns the number of “growths” needed in order to increase the amount of money available on the specified server by the specified amount. The specified amount is multiplicative and is in decimal form, not percentage.
|
|||
|
|
|||
|
Warning: The value returned by this function isn’t necessarily a whole number.
|
|||
|
|
|||
|
<b>Signature:</b>
|
|||
|
|
|||
|
```typescript
|
|||
|
growthAnalyze(host: Host, growthAmount: number): number;
|
|||
|
```
|
|||
|
|
|||
|
## Parameters
|
|||
|
|
|||
|
| Parameter | Type | Description |
|
|||
|
| --- | --- | --- |
|
|||
|
| host | [Host](./bitburner.host.md) | Hostname or IP of the target server. |
|
|||
|
| growthAmount | number | Multiplicative factor by which the server is grown. Decimal form.. |
|
|||
|
|
|||
|
<b>Returns:</b>
|
|||
|
|
|||
|
number
|
|||
|
|
|||
|
The amount of grow calls needed to grow the specified server by the specified amount
|
|||
|
|
|||
|
## Remarks
|
|||
|
|
|||
|
1 GB
|
|||
|
|
|||
|
## Example
|
|||
|
|
|||
|
|
|||
|
```js
|
|||
|
//For example, if you want to determine how many grow calls you need to double the amount of money on foodnstuff, you would use:
|
|||
|
growthAnalyze("foodnstuff", 2);
|
|||
|
//If this returns 100, then this means you need to call grow 100 times in order to double the money (or once with 100 threads).
|
|||
|
```
|
|||
|
|