Hard Light Productions Forums

Off-Topic Discussion => General Discussion => Topic started by: Bobboau on April 22, 2005, 01:52:47 am

Title: mathematica
Post by: Bobboau on April 22, 2005, 01:52:47 am
evil


is anyone here well versed in this horror,
specificly, does anyone here know how to define a function that will return a 3d vector?
Title: mathematica
Post by: WMCoolmon on April 22, 2005, 01:58:49 am
Code: [Select]
vector my_function()
{
     vector retval;
     retval.x = 1.0f;
     retval.y = 0.0f;
     retval.z = 0.0f;

     return retval;
}
Title: mathematica
Post by: Bobboau on April 22, 2005, 06:37:18 am
that's c, not mathematica
Title: mathematica
Post by: WMCoolmon on April 23, 2005, 01:32:06 am
Yep. :p

Have you seen this already?

http://www.math.umass.edu/Courses/Math_421/Notes/Mathematica_Q___A/VectorFn/vectorfn.html
Title: mathematica
Post by: Mongoose on April 23, 2005, 04:07:29 pm
I'm stuck with Maple myself, which is probably just about as bad.  Who writes the syntax for these idiotic programs, anyway?  You'd think that typing "2x" would be automatically taken to mean "2*x", but I guess Maple's too smart for that. :p