6 Commits

Author SHA1 Message Date
Erik Faye-Lund
739fc21cfd player: return interpolated value as double
The heavy lifting was already done in double precision, so just
return the full value to the user without truncating to float.
2012-10-19 17:10:57 +02:00
Erik Faye-Lund
55f2508283 player: add some comments
The code is horribly undocumented as is. Try to improve this by
adding some comments in the most important parts.
2011-01-26 21:41:28 +01:00
Erik Faye-Lund
5efe69d845 player: catch malloc-failures
There were a couple of places where malloc-failures (out-of-memory,
really) weren't caught. This isn't a big deal on modern operating
systems, but is worth dealing with on low-end platforms.

Failures to add/delete keys should count as socket-errors, because
they cause the editor and client to become out of sync.
2011-01-26 21:20:38 +01:00
Erik Faye-Lund
a56dc45690 interpolation: smooth means smoothstep, not cosine
Smoothstep[1] is a nice smooth alternative to cosine that
doesn't require special math functons, and should thus be
suitable on more platforms. The cosine-curve and the
smoothstep are very similar, and this change introduces
only a very small error (always less than 1 per cent)
compared to the old result.

Change the smooth curve definition to match this.

[1]: http://en.wikipedia.org/wiki/Smoothstep
2010-03-25 00:13:02 +01:00
Erik Faye-Lund
874c5b8ede rename LICENSE.TXT to COPYING 2010-03-19 17:41:37 +01:00
Erik Faye-Lund
decf843c04 player/client: port to C
Make sure that all code included in the player and client is
pure C. This helps on portability.
2010-03-19 17:41:34 +01:00