-
Notifications
You must be signed in to change notification settings - Fork 6
Functions Reference
addavriance edited this page Mar 19, 2026
·
1 revision
| Variable | Description |
|---|---|
x |
Block X coordinate |
y |
Block Y coordinate |
z |
Block Z coordinate |
+ - * / ^ ( ) !
| Function | Description |
|---|---|
sin(x) |
Sine |
cos(x) |
Cosine |
tan(x) |
Tangent |
csc(x) |
Cosecant |
sec(x) |
Secant |
cot(x) |
Cotangent |
asin(x) |
Inverse sine |
acos(x) |
Inverse cosine |
atan(x) |
Inverse tangent |
atan2(x,y) |
Two-argument inverse tangent |
acsc(x) |
Inverse cosecant |
asec(x) |
Inverse secant |
acot(x) |
Inverse cotangent |
| Function | Description |
|---|---|
sinh(x) |
Hyperbolic sine |
cosh(x) |
Hyperbolic cosine |
tanh(x) |
Hyperbolic tangent |
asinh(x) |
Inverse hyperbolic sine |
acosh(x) |
Inverse hyperbolic cosine |
atanh(x) |
Inverse hyperbolic tangent |
csch(x) |
Hyperbolic cosecant |
sech(x) |
Hyperbolic secant |
coth(x) |
Hyperbolic cotangent |
acsch(x) |
Inverse hyperbolic cosecant |
asech(x) |
Inverse hyperbolic secant |
acoth(x) |
Inverse hyperbolic cotangent |
| Function | Description |
|---|---|
sqrt(x) |
Square root |
cbrt(x) |
Cube root |
root(x,n) |
Nth root of x |
pow(x,y) |
x raised to power y |
exp(x) |
Exponential (eˣ) |
| Function | Description |
|---|---|
ln(x) |
Natural logarithm |
lg(x) |
Base-10 logarithm |
| Function | Description |
|---|---|
abs(x) |
Absolute value |
floor(x) |
Floor (largest integer ≤ x) |
ceil(x) |
Ceiling (smallest integer ≥ x) |
round(x) |
Round to nearest integer |
sign(x) |
Sign of x (−1, 0, or 1) |
mod(x,y) |
Remainder of x ÷ y |
gcd(x,y) |
Greatest common divisor |
lcm(x,y) |
Least common multiple |
modi(x,y) |
Modular inverse |
max(x,y) |
Maximum of x and y |
min(x,y) |
Minimum of x and y |
clamp(x,min,max) |
Constrain x between min and max |
| Function | Description |
|---|---|
gamma(x) |
Gamma function |
erf(x) |
Error function |
beta(x,y) |
Beta function |
sigmoid(x) |
Sigmoid - 1/(1+e⁻ˣ)
|
| Function | Description |
|---|---|
perlin(x,y,z) |
Perlin noise |
simplex(x,z) |
Simplex noise |
normal(x,y,z) |
Normal noise |
blended(x,y,z) |
Blended noise |
octaved(x,z,octaves,persistence) |
Octaved noise |
! Random functions can impact world generation performance. Use sparingly.
| Function | Description |
|---|---|
rand() |
Random number between 0 and 1 |
randnormal(mean,stdev) |
Random from normal distribution |
randrange(min,max) |
Random between min and max |
| Constant | Value | Description |
|---|---|---|
pi, π
|
3.14159… | Pi |
e |
2.71828… | Euler's number |
phi, φ
|
1.61803… | Golden ratio |
zeta3, ζ3
|
1.20205… | Apéry's constant |
catalan, K
|
0.91596… | Catalan's constant |
alpha, α, feigenbaum
|
2.50290… | Feigenbaum constant |
delta, δ, feigenbaumdelta
|
4.66920… | Feigenbaum delta |
omega, Ω
|
0.68890… | Omega constant |
Have a cool formula? Share it on the Discord server!