01-28-2016, 12:07 PM
(01-28-2016, 11:28 AM)Shaadaris Wrote: *Flips table of values*I'm not sure what exactly you're trying to do, but I have some idea what's the operation are, also if recall correctly back in my microcontroller class you should atleast able to state print max decimal for the integer or something like
ARGIULWUDHBNWIDHUWIHU
THIS IS RIDICULOUS.
Here's the very basic, absolute minimum barebones version of the LUA code that I'm using right now:
Code:
val1 = 0.25
val2 = 2
val3 = 1
repeat
wait(0.01)
print(val3 .. "\n --- \n")
val3 = val3 - val1 / 100 * val2
until (val3 == 0)
Makes sense, right?
val3 goes to 0.995, then to 0.990, and so on, until it's 0.
...Or rather, that's what it should be doing, because apparently I BROKE MATH ITSELF.
Here's the output I get:
and so on...Code:
1
---
1
---
0.99500000476837
---
0.99500000476837
---
0.99000000953674
---
0.99000000953674
---
0.98500001430511
---
0.98500001430511
---
0.98000001907349
---
0.98000001907349
---
0.97500002384186
---
0.97500002384186
---
0.97000002861023
---
0.97000002861023
---
0.9650000333786
---
0.9650000333786
---
0.96000003814697
---
0.96000003814697
---
0.95500004291534
---
0.95500004291534
---
0.95000004768372
---
0.95000004768372
---
0.94500005245209
---
0.94500005245209
---
THIS MAKES NO SENSE. THIS IS NOT HOW YOU MATH. I EVEN CHECKED WITH A CALCULATOR.
Code:
printf("Average mark = %.2f.\n", average);
for buddha's shake why is the code box is still not fixed
since when there was a wing commander animated series?