Panicky Commuter

Show off your games, demos and other (playable) creations.
User avatar
XQYZ
Prole
Posts: 20
Joined: Sat Jul 30, 2011 4:23 pm
Location: Europe
Contact:

Re: Panicky Commuter

Post by XQYZ »

Why the hell would you write your own sine function if you can just use math.sin? You just have to give it the degree in rad (multiply by 2*pi/360 if you didn't pay attention in math class).
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Panicky Commuter

Post by T-Bone »

XQYZ wrote:Why the hell would you write your own sine function if you can just use math.sin? You just have to give it the degree in rad (multiply by 2*pi/360 if you didn't pay attention in math class).
For fun? :P
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Panicky Commuter

Post by Robin »

XQYZ wrote:You just have to give it the degree in rad (multiply by 2*pi/360 if you didn't pay attention in math class).
Why the hell would you convert to radians manually if you can just use math.rad?

:P
Help us help you: attach a .love.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Panicky Commuter

Post by T-Bone »

Robin wrote:
XQYZ wrote:You just have to give it the degree in rad (multiply by 2*pi/360 if you didn't pay attention in math class).
Why the hell would you convert to radians manually if you can just use math.rad?

:P
Didn't know about that one :neko:
User avatar
XQYZ
Prole
Posts: 20
Joined: Sat Jul 30, 2011 4:23 pm
Location: Europe
Contact:

Re: Panicky Commuter

Post by XQYZ »

T-Bone wrote:
Robin wrote:
XQYZ wrote:You just have to give it the degree in rad (multiply by 2*pi/360 if you didn't pay attention in math class).
Why the hell would you convert to radians manually if you can just use math.rad?

:P
Didn't know about that one :neko:
neither did I, but I guess you learn something new all the time. However, the effort of converting deg to rad is comparably low compared to implementing trigonometric functions ;)
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: Panicky Commuter

Post by tentus »

Fun times. A couple more difficulty options would be fantastic.

Also, here's a low-hanging fruit: you can gain just a tiny bit of performance very easily by disabling features in conf.lua. For example, you can set t.modules.joystick and t.modules.physics to false. Instant reduction of startup time (slightly) and reduction of memory usage (again, slightly).
Kurosuke needs beta testers
User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: Panicky Commuter

Post by GijsB »

XQYZ wrote:
T-Bone wrote:
Robin wrote:
Why the hell would you convert to radians manually if you can just use math.rad?

:P
Didn't know about that one :neko:
neither did I, but I guess you learn something new all the time. However, the effort of converting deg to rad is comparably low compared to implementing trigonometric functions ;)
how do radians work actualy >_>?

(i live in europe so i only use degrees)
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Panicky Commuter

Post by T-Bone »

Who says we don't use radians in Europe? What nonsense is this?

Radians is a unit for measuring angles that has several mathematical benefits. A full circle is 2*pi.
Last edited by bartbes on Tue Aug 30, 2011 7:17 pm, edited 1 time in total.
Reason: How dare you get those maths wrong
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Panicky Commuter

Post by Robin »

GijsB wrote:(i live in europe so i only use degrees)
Dude, seriously. Radians is an international standard, like meters and seconds.

Oh, and T-Bone is right. For more information see Dutch Wikipedia.
Help us help you: attach a .love.
User avatar
XQYZ
Prole
Posts: 20
Joined: Sat Jul 30, 2011 4:23 pm
Location: Europe
Contact:

Re: Panicky Commuter

Post by XQYZ »

T-Bone wrote:Who says we don't use radians in Europe? What nonsense is this?
Same. Even our school calculators required input in rad. It's actually a much more logical unit of measurement when it comes to angles since you can derive it from a circle whereas the 360 degrees are purely arbitrary and could as-well be 500 degrees. The only thing that makes it highly impractical is that it relies on the irrational number pi, so you either have to save fractions of pi or deal with inaccuracy.
Post Reply

Who is online

Users browsing this forum: No registered users and 64 guests