H!tman Posted May 17, 2011 Share Posted May 17, 2011 is there a way to use sin on degrees not radians ? like: sin(90) = 1 sin(0) = 0 sin(30) = 0.5 cos(90) = 0 cos(0) = 1 cos(30) = 0.8660254037844386467637231707529361834714 and so on... Link to comment
karlis Posted May 17, 2011 Share Posted May 17, 2011 math.deg() math.rad() these 2 functions converts between radians and degrees. Link to comment
H!tman Posted May 17, 2011 Author Share Posted May 17, 2011 and where should i write it and how? i do like this before: math.deg(math.sin(90)) = 51.222236633301 math.sin(math.deg(90)) = -0.95407978866971 how? Link to comment
Aibo Posted May 17, 2011 Share Posted May 17, 2011 math.sin(math.rad(90)) (my bad, i wrote math.deg at first) ps: http://lua-users.org/wiki/MathLibraryTutorial Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now