The Daily Click ::. Forums ::. Klik Coding Help ::. Math Functions in MMF?
 

Post Reply  Post Oekaki 
 

Posted By Message

Crystal Clear (H.E.S)

Possibly Insane

Registered
  06/10/2002
Points
  2548
24th May, 2003 at 23:25:24 -

Hey all, theres been a few questions regarding some math functions in the expression editor, well i was just wondering if someone could explain what the following do:
---------------------------
*
/
Mod
Misc
Pi
Sin
Cos
Tan
---------------------------
The main ones i really want to know is "*" and "/" do in the expression editor, but any others would be extremely appreciated.

 
HES homepage:
http://www.distinctiv-efair.com/heretic/studios
Crystal Clear Productions: http://www.distinctiv-efair.com/heretic/crystalclear

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
25th May, 2003 at 03:31:25 -

Ok,

* = Multiply, times or X
/ = divide
Pi = 3.141592654 (used for circumfrence and other angles)
Sin = Sine, every number has "Sine" just a variable for calculating angles (used for 360^ angle movement)
Cos = Cosine, brother of Sine, used for calculation of angles (fixed variable)
Tan = Another angle thing i don't know this one.
Mod = remainder of a number divided by another eg. 17 mod 8 = 1 (1 is the remainder)

Mod is useful for grid movements. I used it in a grid based game. eg. Always set x pos to x pos - xpos mod 16. This snaps the player to a 16x16 grid.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
25th May, 2003 at 04:22:52 -

O and Misc. Includes Miscilaneous commands.

Power - To the power of a number
Bit-wise AND, OR and XOR:

Self explanitory except XOR is Not Or i think, could someone confirm that. Anyway most of these things are angle based, pi,sin,cos,tan and can be used for 360^ movement and 3d things. If you want to see and example of a 360^ movement/shooting i can show you that.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
25th May, 2003 at 05:00:44 -

Sine and Cosine aren't fixed variables. They're very important trigonometric functions (used for converting an angle to a vector)

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
25th May, 2003 at 05:03:02 -

oh, and XOR means 'Exclusive Or' - Outputs 1 when one input is 1 but not the other. This is a bit different to 'NOR'

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
25th May, 2003 at 05:23:36 -

They are fixed for differant numbers i meant. Every number/angle has a Sine and a Cosine which are unchanged able. Right?

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Crystal Clear (H.E.S)

Possibly Insane

Registered
  06/10/2002
Points
  2548
25th May, 2003 at 05:42:00 -

Thanks very very no im not confused as much.

 
HES homepage:
http://www.distinctiv-efair.com/heretic/studios
Crystal Clear Productions: http://www.distinctiv-efair.com/heretic/crystalclear

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
25th May, 2003 at 07:16:16 -

Yah XOR is "Exclusive OR" not "Not OR"...

XOR:
X Y Z
0 0 0
0 1 1
1 0 1
1 1 0

NOR:
X Y Z
0 0 0
0 1 1
1 0 1
1 1 1

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

Aali [Crazy_Productions]



Registered
  13/10/2002
Points
  843
25th May, 2003 at 08:36:56 -

Tan(x) (which is the "Tangent" value of x) is simply Sine(x)/Cosine(x) or something like that...

 
"If Darl McBride was in charge, he'd probably make marriage unconstitutional too, since clearly it de-emphasizes the commercial nature of normal human interaction, and probably is a major impediment to the commercial growth of prostitution."
-- Linus Torvalds, December 5th 2003.

(Darl McBride is CEO of The SCO Group)


this place sucks but don't tell anyone, it's our little secret, ok?

Aali [Crazy_Productions]



Registered
  13/10/2002
Points
  843
25th May, 2003 at 08:39:14 -

!"#¤&/£$€{[¤¤%&/¤%/5&(€$47%¤5!"#¤%&/(!"#()¤E¤(/#¤#@£$€[$€€£@@£!!!!!!! damn smileys!

Tan(z) (which is the "Tangent" value of z) is simply Sine(z)/Cosine(z) or something like that... (dunno what it's good for though... )

 
"If Darl McBride was in charge, he'd probably make marriage unconstitutional too, since clearly it de-emphasizes the commercial nature of normal human interaction, and probably is a major impediment to the commercial growth of prostitution."
-- Linus Torvalds, December 5th 2003.

(Darl McBride is CEO of The SCO Group)


this place sucks but don't tell anyone, it's our little secret, ok?

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
25th May, 2003 at 11:15:51 -

I understood everything that was said here.

 
Image
   

Post Reply



 



Advertisement

Worth A Click