Chemistry!

Weekly update:

Started on the basic physics stuff, basically adding the various formulas into the function library, as well as some basic trig functions such as sphere/circle information, displacements (time, location), calculating “the sum of” with a set of numbers in an array, the quadratic equation, and the Pythagorean theorem in their basic forms.

With adding the various “laws”, I have started to wonder why all of the formulas are in one dimensional format where we live in a three dimensional space. Of course, it’s just vector math, but still… in school we always dealt with one dimensional spaces, not three dimensional space. Let’s take Force:

Positional Displacement = X2 - X1
Time Displacement = T2 - T2
Velocity = Positional Displacement / Time Displacement
Acceleration = Velocity / Time Displacement
Force = Mass * Acceleration

However, it is always taught that X sub 1 and X sub 2 (X1, X2) are individual floats, not vectors :\ Anyways, due to this, I’m adding one dimensional and three dimensional functions, which return either the float or vector. The above set of formulas return 1 dimensional figures, where as if you change the positional displacement to X1: (X1, Y1, Z1), X2: (X2, Y2, Z2), you can get the force in all three dimensions. I think :slight_smile:

In addition, to create a calculator with UMG, I also added a nifty function titled: “String: Set Array Elem With AutoIndex”. It would be nice if the compiler wouldn’t error when using wildcards, but yea. It does what the title says, it uses the input pins: Target Array (string array), Item (string), and Size to Fit (boolean), gets the length of the array, if the length is 0, then it sets the index to 0. If the length is more than 0, it increments the index (from 0), and then sets the array element. I also have an output pin with the Target Array Out so that the connections are a bit less spaghetti-fied.