Page 2 of 2

Re: Getting the movement like this.

Posted: Thu Oct 16, 2008 1:42 pm
by Nexion
surtic wrote:Yes, LÖVE uses degrees, but Lua (math.sin and math.cos) uses radians...

Ah well...
That's not that big of a deal; just use the conversion functions

math.rad(degrees) --Converts degrees to radians
math.deg(radians) --Converts radians to degrees

Re: Getting the movement like this.

Posted: Thu Oct 16, 2008 5:28 pm
by surtic
Thanks for that... much easier than my original conversion.

I've been using Lua for some time now (a few years) but have never explored the math library - initially I was using an integer-only version that was running on an embedded system, so the math library was simply not available.