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.
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
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.
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
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.
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
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
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?
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?
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?