Difference between revisions of "Category talk:Variables"
Jump to navigation
Jump to search
literal vs. variable operands
imported>Haama (→Overhaul: Being more specific) |
imported>Scruggs (literal vs. variable operands) |
||
Line 61: | Line 61: | ||
::::[http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=826285&view=findpost&p=12024303 From Elys' tests], everything but % and directly setting the variable (as in your first example) will be limited to Single/float precision. She created [[LC]] so we can do more precise calculations.--[[User:Haama|Haama]] 00:49, 8 April 2008 (EDT) | ::::[http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=826285&view=findpost&p=12024303 From Elys' tests], everything but % and directly setting the variable (as in your first example) will be limited to Single/float precision. She created [[LC]] so we can do more precise calculations.--[[User:Haama|Haama]] 00:49, 8 April 2008 (EDT) | ||
:::::Ely's info applies when doing arithmetic with a variable and a literal value. In DW's second example, doing arithmetic with 2 literal values gives correct results because literals are compiled as doubles. If someNumber of someOtherNumber are variables, the results will be incorrect. | |||
:::::I suppose if they'd tried they could have made it even a little more confusing. ;) [[User:Scruggs|Scruggs]] 11:58, 8 April 2008 (EDT) |