:O help plz
3 posts • Page 1 of 1
:O help plz
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
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
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
-
RA2lover - Posts: 607
- Joined: Mon Aug 31, 2009 8:43 pm
- Location: Brazil
Re: :O help plz
You have to convert the radians into degrees.
Use it like this:
That will return 45 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.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 12 guests