you could define a constant
in lsl (secondlife scripting) one constant is DEG_TO_RAD (and RAD_TO_DEG)
so when you want to convert its deg * DEG_TO_RAD
course all that constant is really doing is deg * (PI / 180) but its kind of a middle ground tween expecting everyone to know how to convert and a full blown function, and i would assume much easier to implement
-2 cents
API Wars
Re: API Wars
Or just use math.rad and math.deg.
Re: API Wars
holy crap, almost 2 years messing around with lua and i have never noticed those before!
ok i will stop talking now
ok i will stop talking now
Re: API Wars
Ok, next war:
Default local origin in top-left of the image.
VS
Default local origin at the center of the image.
I.e.: given love.graphics.draw(image, 50, 50), should the image be drawn so that the center is at (50, 50) or so that the top-left corner of the image is at (50,50)?
Thaaaanks!
EDIT: Clarified question.
Default local origin in top-left of the image.
VS
Default local origin at the center of the image.
I.e.: given love.graphics.draw(image, 50, 50), should the image be drawn so that the center is at (50, 50) or so that the top-left corner of the image is at (50,50)?
Thaaaanks!
EDIT: Clarified question.
-
- Prole
- Posts: 4
- Joined: Wed Jan 21, 2009 3:33 pm
Re: API Wars
This is my proposal for this problem. Pretty Lua.
Draws the default current behavior if placement_origin variable is not provided.
possible placement_origin values:
possible placement_offset values:
any specific set of x and y distance from the origin point.
Code: Select all
love.graphics.draw(image, %d+, %d+, [placement_origin,] [placement_offset])
possible placement_origin values:
Code: Select all
love.TL, love.TM, love.TR
love.ML, love.MM, love.MR
love.BL, love.BM, love.BR
any specific set of x and y distance from the origin point.
Re: API Wars
Yes, but what should the default behavior be?
-
- Prole
- Posts: 4
- Joined: Wed Jan 21, 2009 3:33 pm
Re: API Wars
As the OpenGL/GLUT combo functions. Top Left. (for historical reasons as they say)
Did I mention that I totaly respect what you are doing here. Well done!
Did I mention that I totaly respect what you are doing here. Well done!
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: API Wars
It really doesn't matter to me (althought top-left does seem more correct), however if you change the default behaviour there has to be some sort of compat-code (maybe something with the version string in the config?) as it will invalidate all previous-written games.
Re: API Wars
Ok, looks like top-left so far.
Oh, hohohohoh. All games will be invalidated anyway. The next codename should be Chicxulub, because when I'm done with this version, all that's left of the API is an impact crater. The users that never use LÖVE again due to massive API break will be called Dinosaurs. (They eventually go extinct). HAHAHAhahahha ... hah. ha.bartbes wrote:it will invalidate all previous-written games
That's cool.petsagouris wrote:Did I mention that I totaly respect what you are doing here. Well done!
Who is online
Users browsing this forum: No registered users and 5 guests