If the values you are working on are small and need a lot of precision, you can change the number of bits allocated on each section. In order to do that, just multiply or divid by a power of 2 your number before and after the operation.
Let's take an example: you want to have more decimal precision:
This way you won't loose too much digits during the operation. You have to make sure you don't overflow in the biggest numbers :)
Using a factor of 4096, the maximum number you compute can be 128.
If you would like to know more about these, further reading:
Floating point (this is NOT what is used for Galaxy Real type, but what is being used by everyone else)
I've been working on it for the last 2 hours, still cant get it right.. =(
I will upload an updated version here. Choose TEST 180 bpm in the DJ menu. Arrows are supposed to spawn every 0.3333 sec but still cant get it working..
http://www.sc2mapster.com/api-docs/types/fixed/ They are using fixed-point arithmetic. Basically, a "real" is the same as an "integer" but divided by 4096.
There are 19 bits for the integer part, 12 for the decimal part and 1 for the sign.
It's stored that way in memory:
If the values you are working on are small and need a lot of precision, you can change the number of bits allocated on each section. In order to do that, just multiply or divid by a power of 2 your number before and after the operation.
Let's take an example: you want to have more decimal precision:
This way you won't loose too much digits during the operation. You have to make sure you don't overflow in the biggest numbers :) Using a factor of 4096, the maximum number you compute can be 128.
If you would like to know more about these, further reading:
@Nevir27: Go
Big thank! I am reading the file now. Will get back to u shortly
@Nevir27: Go
I still cant get it right.
@Nevir27: Go
I've been working on it for the last 2 hours, still cant get it right.. =( I will upload an updated version here. Choose TEST 180 bpm in the DJ menu. Arrows are supposed to spawn every 0.3333 sec but still cant get it working..
it bugs me so much!!
@shaotang: Go
I found a alternative way to solve to problem!!! I am working on it right now, should be sweet. Will release soon or later soon