#Not whole numbers for upgrade cards

1 messages · Page 1 of 1 (latest)

keen horizon
#

These Knots sure are knotted up!

formal flint
#

Reported multiple times, known bug

unborn terrace
#

haha... I don't know how you managed to get something to give you a non-integer that but I can say they're stored internally as a double, so its not completely surprising to see it show a non-integer, just nothing should be modifying them except as an integer

formal flint
#

Huh, why is it better to store them as a double rather than an int? Just curious

unborn terrace
#

I'm not sure I'd say its better, but its the way they've been stored in the game since forever ago. If I were to rewrite that system I would probably store them as an uint16 or uint32 since the counts are unlikely to ever get ludicrously huge (uint8 is too small). However, we also store a bunch of other numbers including the various currencies in the same thing so its just easier to use a double for everything for now. Plus double can exactly represent all int32 values

formal flint
#

Ok, fair

#

If the currencies are stored in the same thing, it sounds a lot easier to store this as a double too

harsh atlas
#

I was gonna post a bug report for this but you already did. Anyways here are my pics of it lol.

unborn terrace
#

do either of you know how to reproduce the issue? ( Also I've filed a copy of this bug as CELL-1835 )

harsh atlas
#

it's just stuck this way

#

also Idk if it would work but maybe if the game recognizes a non-integer card, as a temporary work around it just forces it to the closest integer?

lucid ingot
#

Can you send me a DM? for troubleshoot.

harsh atlas
harsh atlas
# unborn terrace do either of you know how to reproduce the issue? ( Also I've filed a copy of th...

In computing, floating-point arithmetic (FP) is arithmetic that represents subsets of real numbers using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base.
Numbers of this form are called floating-point numbers.: 3 : 10 
For example, 12.345 is a floating-point number in base ten with five di...

#

I don't understand it though 0_0

harsh atlas
#

IDFK MAN