Factorio Prototype DocsVersion 1.1.107

NoiseFunctionExponentiate :: struct Example code

Takes two arguments and raises the first to the second power.

Properties

type :: "function-application"
function_name :: "exponentiate"
arguments :: {NoiseNumber, NoiseNumber}

Properties

type :: "function-application"

function_name :: "exponentiate"

arguments :: {NoiseNumber, NoiseNumber}

Example

local one_thousand = -- 10^3
{
  type = "function-application",
  function_name = "exponentiate",
  arguments = {
    {
      type = "literal-number",
      literal_value = 10
    },
    {
      type = "literal-number",
      literal_value = 3
    }
}

-- or with the noise lib
local noise = require("noise")
local tne = noise.to_noise_expression

local twentyfive = tne(5)^tne(2) -- 5^2

Prototypes

Types