Closed khval closed 2 years ago
"Morphing.amos" / "Morphing2.amos" found a bug in "Screen Mode" command. (not a math issue.)
Expected cause, if many arrays with index are used in the same mathematical formula, I guess the index get confused. might be store value at wrong place, maybe? This needs investigation.
Issue with arrays inside expressions with in parenthesis, think its fundamental issue with how arrays are handled in Amos kittens, two things come to mind, its pretty complicated, does it need to be? why can’t indexes be handled in the same why as parenthesis is implemented. Should not parenthesis remember last variable? I can imagine problems with nested arrays.
Nested arrays works, it looks like the problem is even more fundamental, it has to do with order of * / + - % etch, it looks like the ( and ) symbols, destroys the order of operations, the stack is also over written and corrupted.
Looks like some of the problem is solved. At least cube is now drawn, but is not centered like it should.
Wrote a few tests, should be working now.
Describe the bug:
Strange math bug in "Morphing2.amos" and "Graphic 3D-Cube.Amos" (I think bug is similar, so reported as one bug.)