Hello this is my first post.
I am building a simulation in gravity mechanics. Mass of an object is important to the math required to model this simulation. Mass in Roblox is the volume of the part I’m measuring. In order to proof this, and the relationship CustomPhysicalProperties.Density has with mass, I wrote a quick script to test this.
I compare Part:GetMass() with my own calculation which uses math.pi. The results are extremely close. However the output shows a very slight difference numerically. I have tired to mess around with pi and how many decimal places I’m using, or even rounding up to. But I am unable to make a perfect match.
How does Roblox physics engine calculate pi? How many decimals does it use? Any thoughts?
Here is my proof script and the output: