:O help plz

About advanced scenes, and the Thyme scripting language used in Algodoo.

:O help plz

Postby jessebax129 » Thu Jan 07, 2010 4:44 pm

http://www.algodoo.com/algobox/details.php?id=35968

that's the scene

i get a solution by scene.my.tan1 = 1.23985.......... and that sort of things

it has to calculate the angle of scene.my.hit1

imagine a triangle with a 90 degrees corner (sorry im not english neither american or so

the top corner of the triangle = scene.my.hit1 the other (right bottom one) is scene.my.hit1(0) and the bottom left corner is [0,0]

think that scene.my.hit1 = 1 and scene.my.hit2 = scene.my.hit1(1) / scene.my.hit1(0)

<<<lets take that scene.my.hit2 = 1>>>

and i put it is the formule: math.atan(scene.my.hit2)

then as a solution i have to get exactaly 45* out BUT: I get ''1.239055690436'' or something like that / similiar

so plz algodoo players HELP
jessebax129
 
Posts: 34
Joined: Tue Jan 05, 2010 6:32 pm

Re: :O help plz

Postby RA2lover » Thu Jan 07, 2010 4:59 pm

phun/algodoo measure angles in radians, not degrees.
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil

Re: :O help plz

Postby standardtoaster » Thu Jan 07, 2010 6:05 pm

You have to convert the radians into degrees.
Code: Select all
Scene.my.rad2deg=(d)=>{d * 180/math.pi}

Use it like this:
Code: Select all
Scene.my.rad2deg(math.pi/4)

That will return 45 degrees.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 12 guests