by GotLag

Trains honk when stopping. And starting. And on command.

2 years ago
0.13 - 1.1

b "worse than Euclidean and more expensive" :p

4 years ago

A quick dirty test tells me your implementation is 35% slower than a traditional euclidean. In comparison i count three additional function calls and an additional division. And you're not even localizing the table lookups. :p

It's a pity the API doesn't allow changing volume after creation, so the sound stays at volume even if one moves really fast (say, in another train). I need doppler effects...

4 years ago

Optimising Lua does not come naturally to me. I keep forgetting that all the "expensive" operations like square roots get passed off to native functions.

4 years ago

I don't even know how much that bit of code affects the total runtime cost. I just saw the comment in the code and had to check it out ;).

New response