Turning an image
Posted: Fri Apr 08, 2011 8:03 pm
Title says it all. How can i turn an image?
PS: I just realised this is the 666th thread
PS: I just realised this is the 666th thread
You could also do this:Robin wrote:In case you don't know how radians work: 0 = normal, math.pi/2 = 90°, math.pi = 180°, etc.
Code: Select all
math.tau = math.pi * 2
math.tau -- 360 deg
math.tau / 2 -- 180 deg
math.tau / 4 -- 90 deg
You could also do this:BlackBulletIV wrote:You could also do this:Robin wrote:In case you don't know how radians work: 0 = normal, math.pi/2 = 90°, math.pi = 180°, etc.Much easier to remember for me. (By the way, I'm using Tau from here: http://tauday.com)Code: Select all
math.tau = math.pi * 2 math.tau -- 360 deg math.tau / 2 -- 180 deg math.tau / 4 -- 90 deg
Code: Select all
math.rad(90) -- 90 deg
The screen is cleared and drawn each frame.Anxiety wrote:But if it already is in the screen and i want to get rid of it?
Code: Select all
display = true
function love.draw()
if display then
love.graphics.draw(...)
end
end
I find Tau easier in some ways because if you replace the math.tau bit with 1, that's the fraction of the circle you get with the angle. But anyway, each to their own.nevon wrote:You could also do this:BlackBulletIV wrote:You could also do this:Robin wrote:In case you don't know how radians work: 0 = normal, math.pi/2 = 90°, math.pi = 180°, etc.Much easier to remember for me. (By the way, I'm using Tau from here: http://tauday.com)Code: Select all
math.tau = math.pi * 2 math.tau -- 360 deg math.tau / 2 -- 180 deg math.tau / 4 -- 90 deg
Much easier to remember for me. (Granted, your ways are much faster, but w/e)Code: Select all
math.rad(90) -- 90 deg