2 hours ago, g4borg said:
Otherwise, with floats, it helps to remember, resolution. float has a finite set of bits, depending on where the decimal is, this limits the total amount of significant digits / information stored, before and after the decimal. Btw. it’s called float because of this, the “decimal floats” between the digits dynamically. this means, that some numbers cannot be sufficiently displayed. numbers in front of the decimal take away more and more resolution, while infinitely small numbers may be cut off if combined with larger ones, if their significant parts are behind a lot of zeroes (1.2784blah E-9 ). it is not the only reason, but it plays into results, which are calculated over multiple steps, with different scales of numbers, you basicly cut off information. This gets more interesting in simulation, where this effect creates camera shakes in 3d sims if your coordinates you work with are at a certain distance from (0,0,0), reducing the resolution behind the decimal, and the main reason, most games using floats for x, y, z have a maximum mapsize of 99-999 units (whatever a unit may be, e.g. SC seems to be around 1f = 10m). There are other reasons, but this is one of the main issues for float, as the same problem almost never appears for doubles (64 bit), except you go into crazy number calcs.
I only tell you this, since you will have to study floats if you reach 3d coding. With your current learning speed, that might happen soon! ![:p](<fileStore.core_Emoticons>/emoticons/004.png “:p”)life hack: if you ever see this happening at input (so if you input 127, and suddenly it says 127.0000001 in any kind of application) you know automatically, whatever you input, gets calculated in the background, or transformed into another number and retransformed for display, because this effect _always_ happens after calculations. this means, it is sufficient to round the value you display at output, rounding inbetween will achieve nothing, and a float will not suddenly change into something else, if you explicitly define it. Only saying, because before i understood floats, and to be honest it took me quite a few attempts, i was never sure wtf. Especially at applications, which let you input degrees (0°-360°) but stored the value in radians, so your inputted number suddenly gets fuzzy.
i looked at it, quite cool and short, kudos for releasing with source.
well okay, with js, thats hardly a question, but you know what i mean, with link to repo ![:)](<fileStore.core_Emoticons>/emoticons/001j.png “:)”)
Thanks
and nearly everything I have coded that has to do with SC and got finished, is avaible somewhere in the forum\the link to the source code in the forum (the crappy directx overlay ID counter and the php stats to picture thingy I used to have in my Sigbature(which actually broke the ruled since it was 20px or so to side))
Does anyone know what the minimum ram requirement for php is? I have 36Mb left.