Oh, I got hot sause all over my bazito!

You know what this is? It's a brain sucker. You know what it's doing? Filing its tax return

If you wish to make an apple pie from scratch, you must first invent apple pie

The Adventures of Little Ed Brave

Tell airport security your name is McCannister because you can hide anything in a cannister.

You know what? Nobody notices when this changes anyway.

There are 10 types of people in the world: Those who understand binary, and STFU

What happens in a black hole stays in a black hole

The black hole draws you inexorably inward. Time slows. You are likely to be eaten by a grue.

I'd diddle little umdidlie... if she weren't my half-sister.

Abortion prevents pedophilia. In more ways than one!
Get Firefox!
I wrote a haiku

which I was about to share,

but then I thought, "screw it."
Level 1

Notice to all users of the Holodeck:

There are safety protocols in place that cannot be deactivated without the approval of two commanding officers or the captain to protect users of the Holodeck from potential harm. However, every time the Holodeck is ever used in a nontrivial manner, no matter what the safety protocols say, the Holodeck turns into a deathtrap.

Unless you believe yourself to be adept at constructing a forcefield from your communicator and 19th century Earth tools, or you're at the very least not wearing a red shirt, you are strongly advised not to attempt to use the Holodeck until a designer comes up with a safety protocol that doesn't kill you whenever somebody looks at it funny. Even when you're not on the holodeck. Or in the same quadrant. Or time period.

In fact, if you are wearing a red shirt, Starfleet may not be the job for you

« Duels of the PlaneswalkersErgonomic Keyboards are the crap »


Permalink 06/20/09 at 07:43:45 am, by Ed, 124 words   English (US)
Categories: Programming

And I'm talking about a real shockwave, not some crappy Flash knockoff from the 90's. I was originally using sin, cos, arctan, pow, AND sqrt, but this is totally more efficient.

for (int i = 0; i < d.Length; ++i) {
    PointF p = d[i];
    float dx = p.X - src.X;
    float dy = p.Y - src.Y;
    float distSquared = dx * dx + dy * dy;
    float mySpeed = speed / distSquared;
    p.X += dx * mySpeed;
    p.Y += dy * mySpeed;
    d[i] = p;

I just cooked that up this morning. The version in my game Ant Hill still uses all those things I mentioned. I'll probably change that around on Monday. I hope nobody steals it and claims it as their own. Frankly, it's not that complicated, I would think.

No feedback yet

Comments are closed for this post.