Maarten Baert's website

Game Maker / C++ projects

Home Model Creator ExtremePhysics Game Maker DLLs SimpleScreenRecorder AlterPCB Quadcopters   Recent comments Search

Last modified: Wed, 3 Feb 2010
Refresh

Expressions

All input boxes support expressions (they use my Calculator Dll). This means you can type '360/7' or '5/sqrt(2)' and Model Creator will evaluate it. The calculator supports:

  • Standard operators: +, -, * and /

  • Scientific notation (1.52e8)

  • Brackets

  • Functions (see function list below)

  • Constants

The syntax and functions supported by the dll work the same as in GM. The following functions are supported:

abs(x)
sign(x)
round(x)
floor(x)
ceil(x)
frac(x)
sqrt(x)
sqr(x)
power(x,n)
exp(x)
ln(x)
log2(x)
log10(x)
logn(n,x)
sin(x)
cos(x)
tan(x)
arcsin(x)
arccos(x)
arctan(x)
arctan2(y,x)
degtorad(x)
radtodeg(x)
mod(x,divisor)
div(x,divisor)
min(x1,x2,x3,...)
max(x1,x2,x3,...)
mean(x1,x2,x3,...)
median(x1,x2,x3,...)
point_distance(x1,y1,x2,y2)
point_direction(x1,y1,x2,y2)
lengthdir_x(len,dir)
lengthdir_y(len,dir)
random(x)
make_color_rgb(red,green,blue)
color_get_red(col)
color_get_green(col)
color_get_blue(col)
merge_color(col1,col2,amount)

The dll also supports the constants pi and e.


Comments

There are no comments yet.

Write a comment