What is the size limitation of attributes by type ?
jfoc2009
Member Posts: 12
When using an attribute with type real and put the number 12345.56 it's OK, but when I use 123456.56 the result is always 12345.6.
So, to help me to project the maths behaviors I need to know the size limitations.
For example, I use this function to get last digit from a real number (A kind off numbers display) but I got ZERO because GS round it:
floor(((self.bankBalance * self.multiplier ) % self.div1 ) / self.div2 )
Where:
self.bankBalance = 12345.56
self.multiplier = 100
self.div1 = 10
self.div2 = 1
This is a actor prototype to be used to display digits from any position of a number: decimal, units, tens, hundreds, thousands, ten thousands, etc..
What I need:
GS not rounding the number. If is my mistake, please advise me.
Thanks a lot for any help
So, to help me to project the maths behaviors I need to know the size limitations.
For example, I use this function to get last digit from a real number (A kind off numbers display) but I got ZERO because GS round it:
floor(((self.bankBalance * self.multiplier ) % self.div1 ) / self.div2 )
Where:
self.bankBalance = 12345.56
self.multiplier = 100
self.div1 = 10
self.div2 = 1
This is a actor prototype to be used to display digits from any position of a number: decimal, units, tens, hundreds, thousands, ten thousands, etc..
What I need:
GS not rounding the number. If is my mistake, please advise me.
Thanks a lot for any help
Comments
----------------------------------------------
http://davidgriffinapps.co.uk/
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
floor((12345.43*100)%10) = 3
but
floor((game.bankBalance*100)%10) = 0
where game.bankBalance is set manually on attributes list to 12345.43 and is REAL typed
For sure this is a BUG!