08.11.2012 Views

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

andom_set_seed(seed) Sets the seed (an integer) that is used for the<br />

random number generation. Can be used to repeat the same random<br />

sequence. (Note though that also some actions and the system itself uses<br />

random numbers.<br />

random_get_seed() Returns the current seed.<br />

randomize() Sets the seed to a random number.<br />

choose(val1,val2,val3,...) Returns one of the arguments choosen<br />

randomly. The function can have up to 16 arguments.<br />

abs(x) Returns the absolute value of x.<br />

sign(x) Returns the sign of x (-1, 0 or 1).<br />

round(x) Returns x rounded to the nearest integer.<br />

floor(x) Returns the floor of x, that is, x rounded down to an integer.<br />

ceil(x) Returns the ceiling of x, that is, x rounded up to an integer.<br />

frac(x) Returns the fractional part of x, that is, the part behind the decimal<br />

dot.<br />

sqrt(x) Returns the square root of x. x must be non-negative.<br />

sqr(x) Returns x*x.<br />

power(x,n) Returns x to the power n.<br />

exp(x) Returns e to the power x.<br />

ln(x) Returns the natural logarithm of x.<br />

log2(x) Returns the log base 2 of x.<br />

log10(x) Returns the log base 10 of x.<br />

logn(n,x) Returns the log base n of x.<br />

sin(x) Returns the sine of x (x in radians).<br />

cos(x) Returns the cosine of x (x in radians).<br />

tan(x) Returns the tangent of x (x in radians).<br />

arcsin(x) Returns the inverse sine of x.<br />

arccos(x) Returns the inverse cosine of x.<br />

arctan(x) Returns the inverse tangent of x.<br />

arctan2(y,x) Calculates arctan(Y/X), and returns an angle in the correct<br />

quadrant.<br />

degtorad(x) Converts degrees to radians.<br />

radtodeg(x) Converts radians to degrees.<br />

min(val1,val2,val3,...) Returns the minimum of the values. The<br />

function can have up to 16 arguments. They must either be all real or all<br />

strings.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!