I'm sure most of you know what that is, if not I could give an explanation.
a^2 + b^2 = c^2
Here is a definition of it.
"In mathematics, the Pythagorean theorem—or Pythagoras' theorem—is a relation in Euclidean geometry among the three sides of a right triangle. It states that the square of the hypotenuse is equal to the sum of the squares of the other two sides" (I got this from the Wikipedia.)
c is the side across from the right angle being the hypotenuse.
Say I lean a part at an angle against a wall in roblox, I want to find the hypotenuse.
My first question is, how would I even begin measuring? would I go by studs??
So if we are doing studs then here is another example.
I want to find the distance across a square shaped part.
Each side of the square is 1 stud long.
Step 1. a^2 + b^2 = c^2
Step 2. 1^2 + 1^2 = c^2
Step 3. 1 + 1 = c2
Step 4. 2 = c2
Step 5. c2 = 2
Step 6. c = (SquareRootSymbol)2 = 1.4142... (The answer)
What I am trying to do is make a roblox defined equation for automatically finding the hypotenuse for a part on roblox. Either it be a triangle or just a square part. What should I do to make it fully functional? and transfer a^2 + b^2 = c^2 to roblox form? Sort of like a Pythagorean theorem calculator.
Imagine a box get cut in half, then it will measure the length and the height size. Then square them. THEN it will add the two together giving you the hypotenuse but... the hypotenuse must be square rooted. Then the length across the square will be given.

5 comments
Could you please provide a screenshot of roblox, with some drawings on top of it to show what you want? I'm having trouble understanding your situation.
I will when I get home. When you select by doing game.Workspace.Part or whatever.. It will measure the sizes of each side being A and B. It will then square the sizes then add them together and it will then find C^2.. Then it will find the square root of C, returning the length of the hypotenuse.
To get the length of the sides of a rectangular-shaped part, you can just use part.Size.X and part.Size.Z. These properties are measured from the center, but they will be the same on the edges as well. If those are your
aand yourb, then you can use the function I provided below to find the length hypotenuse of our triangle, which will be the length of the line if you were to draw a diagonalThis helped, Thanks!
"... draw a diagonal line from the top-left corner to the bottom-right, assuming you were looking straight down. " No problem.