Takes two arguments and raises the first to the second power.
type | :: "function-application" | |
function_name | :: "exponentiate" | |
arguments | :: {NoiseNumber, NoiseNumber} |
arguments | :: {NoiseNumber, NoiseNumber} | |
function_name | :: "exponentiate" | |
type | :: "function-application" |
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