# Simple question

Get help using Construct 2

### » Tue Jan 14, 2014 8:45 pm

I'd like to understand this too!

Like I previously mentioned before math isn't my strong point but my assumptions normally get me a starting point :)

Therefore I'm assuming runtime constants are just "constants" in the mathematical context that there static values, i.e. they don't change?!

Not sure what the collapsing of expressions are maybe there the result values enumerated from the expression?!

In answer you your question tho @CakeSpear yes the 64999966*one / 1000000 (one equalling 1) does seem to provide a more accurate result in 64.999966

B
9
S
3
G
1
Posts: 112
Reputation: 1,827

### » Tue Jan 14, 2014 9:23 pm

I missed a comma there between "runtime" and "constants". 64999966 and 1000000 are constants. By collapsing I mean that 64999966/1000000 is replaced by 64.999966 to avoid needless calculations. The thing to note is the calculation is done before runtime, which is where the issue seems to lie.

By using a variable between two constants the calculation is all done at runtime.
And yes by doing the second bit it does give the correct output.
See the bug report for a capx:
http://www.scirra.com/forum/constant-folding-percision-issue_topic84055.html
B
97
S
36
G
131
Posts: 5,520
Reputation: 83,478

Previous