A Daily (maybe enough for a month) Dose Of Math

Hrmm… I have been working with a lot of big numbers that are seemingly pointless. They actually serve a purpose in my video game, for all the background stuff and calculating the vectors for everything. Well, enough ranting here is the dose of numbers (mixed into code):

cubes.put(setcube(new Vector3f((x*cubesize)+offset.x, (y*cubesize)+offset.y, offset.z)), new Vector2f(x, y));

return interpolate(startingvector, endingvector, ((time – startingtime) / (endingtime – startingtime)));

And the boss of all the confusion is right here:

return (double) (1.0 – ((x * (x * x * 15731 + 789221) + 1376312589) & 2147483647) / 1073741824.0);

 

Yes, seemingly err… Pointless. The numbers are lined up just right so that they fulfill their action the way they are supposed to.

 

Off topic:

As for the forum, I’m not sure what I’m going to do about that. I turned down the security one notch thinking that I had enough captcha, and then the next morning there were 500 new members each with about 20 posts each. (spambots if you didn’t catch on) Up to this day, I can still see them on the recent visitors list, searching for a way to spam my forum.

 

4 thoughts on “A Daily (maybe enough for a month) Dose Of Math

  1. hey buddy, how are you doing? I have not played any computer games for a while and been busy i would love to see how your game is coming.

    • Hey,
      Its a slow process. I am on the third rerun of the background frame for the game, and I hope to have the framework for world management done soon. I have been thinking about changing the concept of the game slightly. I have a lot of stuff going on in real life, so that slows things down.

  2. I hear ya, me too. I have been playing world of tanks alot lately so you if you wanna come play it again I probably will be online 😛

Leave a Reply

Your email address will not be published. Required fields are marked *