Documentation menu

Standard Library

Math & Geometry

Always available, no import needed.

New to coding?

Copy the examples exactly first. Run them. Then change one number or word and run them again. You are not expected to memorize the command lists.

1

Core math

Try this code
abs(-5)          // 5
floor(3.7)       // 3
ceil(3.2)        // 4
round(3.5)       // 4
sqrt(9)          // 3
pow(2, 10)       // 1024
max(3, 5)        // 5
min(3, 5)        // 3
clamp(v, 0, 100)
lerp(a, b, t)
sign(-7)         // -1
2

Trigonometry

Try this code
sin(x) cos(x) tan(x)
atan2(y, x)
pi()
3

Distance & collision

Try this code
dist(x1,y1, x2,y2)
dist3d(x1,y1,z1, x2,y2,z2)
rects_overlap(x1,y1,w1,h1, x2,y2,w2,h2)
circles_overlap(x1,y1,r1, x2,y2,r2)
box3d_overlap(min1,max1, min2,max2)
point_in_rect(px,py, x,y,w,h)