square root and the square?

square root and the square?

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!

Torpedo

Posts: 120
Joined: Mon Aug 31, 2009 8:51 pm

Re: square root and the square?

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.....
Chronos wrote:There's nothing wrong with swearing. They're just words. People just think they have a bad meaning. What's the difference between shit and poo? Nothing. They're the same.

Rhett97

Posts: 522
Joined: Mon Aug 31, 2009 10:32 pm

Re: square root and the square?

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. If anybody would like to help please PM me.

standardtoaster

Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: square root and the square?

Are you talking about the distance formula?
Also, since when was I an expert thymer?

Conundrumer

Posts: 344
Joined: Mon Aug 31, 2009 5:55 pm
Location: NYC

Re: square root and the square?

Yea, I thought you hated thyme

Versieon

Posts: 375
Joined: Tue Sep 01, 2009 4:45 pm

Re: square root and the square?

Just use the ^ thing. So square root is for example: (Mammoth)^0.5 and squared is (Mammoth)^2. Cool Mammoth squared!
a Mammoth

Posts: 66
Joined: Tue Sep 01, 2009 3:46 am

Re: square root and the square?

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.
<- Designed by PhysicsGuy

xplane80

Posts: 498
Joined: Mon Aug 31, 2009 7:28 pm

Re: square root and the square?

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

KarateBrot

Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: square root and the square?

that sorta solved my problem, scenes acting all weird though and sometimes pulling numbers that arent right :S cant figure out why though.

Torpedo

Posts: 120
Joined: Mon Aug 31, 2009 8:51 pm

Re: square root and the square?

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!