After a few weeks of re-learning Dynamic Components and rediscovering of all the gothcha’s I decided to dip my toes in Live Components… creating the same objects to compare the methodologies…
Working thru the tutorials I am finding most of it more intuitive than my first attempt a few years ago… maybe because I have just re-triggered programming logic in my brain or maybe LC’s environment has improved… not sure…
Accepting that I am still a novice in LC’s and I could not find any forum post regarding calculation accuracy I am hoping this will be easily explained but when I list the Points matrix from the tutorial example “Align Geometries” I am surprised to see what appears to be numerical inconsistencies…
You are sort of “seeing” behind the veil here, believe it or not, this is the result of being very precise. Materia operates at double-precision (which is going to be pretty dang good unless you start modeling large models with mm as your standard unit).
The actual value is 499.99999999999994 which is a double precision value and a heck of a lot more accurate than the displayed 499.99 (due to display cut-off).
Some (most) applications will display values at a lower precision. If we were to take that 499.99999999999994 double precision value and display it as single precision, you would get: 500 (which would look more accurate but is actually LESS accurate).
Now you might ask “why 499.99… anyhow, all the operator is doing is creating a box?”. Well that is slightly harder to explain, but it is due to multiple math calculations occurring to ‘place’ those points. Those math operations occur at a high precision which generates those long decimals.
The key thing to remember is that if you convert those points to a lower precision, they will “become” the clean expected value of 500 because we are actually calculating at a high precision.