mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
work to make documentation unified.
This commit is contained in:
@@ -1,24 +1,23 @@
|
||||
growthAnalyze() Netscript Function
|
||||
==================================
|
||||
|
||||
.. js:function:: growthAnalyze(hostname/ip, growthAmount)
|
||||
.. js:function:: growthAnalyze(hostname, growthAmount)
|
||||
|
||||
:param string hostname/ip: IP or hostname of server to analyze
|
||||
:param number growthAmount: Multiplicative factor by which the server is grown. Decimal form. Must be >= 1.
|
||||
:returns: The amount of grow() calls needed to grow the specified server by the specified amount
|
||||
:RAM cost: 1 GB
|
||||
:param string hostname: Hostname of server to analyze.
|
||||
:param number growthAmount: Multiplicative factor by which the server is
|
||||
grown. Decimal form. Must be >= 1.
|
||||
:returns: The amount of :doc:`grow<grow>` threads needed to grow the specified
|
||||
server by the specified amount.
|
||||
|
||||
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.
|
||||
Example:
|
||||
|
||||
The specified amount is multiplicative and is in decimal form, not percentage.
|
||||
.. code-block:: javascript
|
||||
|
||||
For example, if you want to determine how many `grow()` calls you need
|
||||
to double the amount of money on `foodnstuff`, you would use::
|
||||
// How many grow threads are needed to double the current money on 'foodnstuff'
|
||||
growthAnalyze("foodnstuff", 2); // returns: 5124
|
||||
|
||||
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).
|
||||
If this returns 5124, then this means you need to call :doc:`grow<grow>`
|
||||
5124 times in order to double the money (or once with 5124 threads).
|
||||
|
||||
**Warning**: The value returned by this function isn't necessarily a whole number.
|
||||
|
||||
Reference in New Issue
Block a user