Jump to content
Banner by ~ Ice Princess Silky
  • entries
    10
  • comments
    99
  • views
    2,321

About this blog

Tutorials and blah! Just showing things really. (Showing off?)

Entries in this blog

(Math) Beating Pythagoras...

I have watched countless YouTubers and their science videos. One thing they all have in common is the word they keep throwing at their audience: "Albert Einstein". It is a free word to use, but it somehow bring in revenues.       In mathematics, we have a similar word: "Pythagoras". Remember him from preschool math? He figured out some great geometry calculations. The most known, and extremely useful, is the Pythagorean theorem.   It goes something like this:

Splashee

Splashee in Binary Math

Division by 0 must always be a CPU Exception

In my previous blog about binary division, I stated the first rule about doing division is being "an Exception" if the divisor is equal to 0. This is different from returning a result. No longer will the CPU of the computer be executing normally after such an operation: Quotient = dividend / 0 Modulus = dividend % 0 The operation will return a quotient and remainder of a binary division (two results). If the absolute (positive) divisor is higher than the absolute (positive) dividend,

Splashee

Splashee in Binary Math

Binary Math (Division)

Previously, we talked about multiplication and Bitwise Shift Left. It was quite fun to figure out how to do multiplication since basically all CPUs support it (all had to be figured out without direct help). Division however, is not supported by all CPUs, most noted by the modern handheld console Gameboy Advance that required a lot of division, but had no support for it. The C and C++ standard requires the division and modulo operators, meaning they must be emulated by the compiler if hardwa

Splashee

Splashee in Binary Math

Binary Math ("The Wrapping Point")

In game development, maybe the most common way to time "events" is to use a delta time. The absolute time that is considered "now" minus the previous absolute time, gives you a delta time: You can then multiply this delta time with the events and physics of the game. This is very common but have a lot of problems that creep in later. One of those problems might appear out of nowhere, and is the wrapping point.   Consider you have an absolute time of 56670001 milliseconds, and yo

Splashee

Splashee in Binary Math

×
×
  • Create New...