Page 1 of 1

square root and the square?

PostPosted: Tue Sep 01, 2009 11:37 pm
by Torpedo
Trying to do Pythagoras to find a length using the vectors, but I cant find anything in the wiki on how to do either. Can anyone help?

On a side note, isnt it about time a full thyme guide with syntax and examples were made by those in the know? its isnt half annoying getting stuck all the time with very few resources (and those that are there, are often writen from different perspectives and difficultly level to related material, making it hard to understand what they've said) come on!

Re: square root and the square?

PostPosted: Wed Sep 02, 2009 12:31 am
by Rhett97
yeah i think some of our EXPERT thymers (Emil,Grady,Kile,Para,Conun) should all make like a Free E-book or a Wiki book for all Phunners.....

Re: square root and the square?

PostPosted: Wed Sep 02, 2009 1:33 am
by standardtoaster
Rhett97 wrote:yeah i think some of our EXPERT thymers (Emil,Grady,Kile,Para,Conun) should all make like a Free E-book or a Wiki book for all Phunners.....

That's what am working on. :crazy: If anybody would like to help please PM me. :D

Re: square root and the square?

PostPosted: Wed Sep 02, 2009 2:32 am
by Conundrumer
Are you talking about the distance formula?
Also, since when was I an expert thymer?

Re: square root and the square?

PostPosted: Wed Sep 02, 2009 2:48 am
by Versieon
Yea, I thought you hated thyme :lol:

Re: square root and the square?

PostPosted: Wed Sep 02, 2009 3:12 am
by a Mammoth
Just use the ^ thing. So square root is for example: (Mammoth)^0.5 and squared is (Mammoth)^2. Cool Mammoth squared!

Re: square root and the square?

PostPosted: Wed Sep 02, 2009 10:42 am
by xplane80
The ^ is a carat/caret it can signify an exponent (3^4 or 3*3*3*3) or can be a logical operation to signify XOR (Exclusive Or) or AND.

Re: square root and the square?

PostPosted: Thu Sep 03, 2009 3:24 pm
by KarateBrot
You only need to know a bit of math. if you know how to do exponents in thyme that's all what you need. btw it's "math.pow(x,y)" or just type "x^y"

So what you need is
Code: Select all
scene.my.distance =
((scene.my.pos2(0) - scene.my.pos1(0))^2 + (scene.my.pos2(1) - scene.my.pos1(1))^2)^0.5

Re: square root and the square?

PostPosted: Thu Sep 03, 2009 11:21 pm
by Torpedo
that sorta solved my problem, scenes acting all weird though and sometimes pulling numbers that arent right :S cant figure out why though.

Re: square root and the square?

PostPosted: Thu Sep 03, 2009 11:58 pm
by electronicboy
Rhett97 wrote:yeah i think some of our EXPERT thymers (Emil,Grady,Kile,Para,Conun) should all make like a Free E-book or a Wiki book for all Phunners.....

don't you mean algodoers? and i support an ebook or what ever!