GameMakerHelpBlog

Sunday, January 6, 2008

Expanding

Hi

Here is another Mathematical function from me.

Expanding is when you multiply two figures in a bracket with the number on the outside on the left hand side. Or as most people would call it. Blimn algebra. Expanding works as follows a(b+c) or a(b-c) or a(b/c) or a(b*c) . A is the multiplying factor and B and C are the figures that are multiplyed.

[code]

fig1 = argument0
fig2 = argument1
multiplyer = argument2
fig1 = fig1*multiplyer
fig2 = fig2*multiplyer
fig3 = string(fig1) + " + " + string(fig2)

[/code]

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home