>>This isn't much of a question, but more of an in-depth look at ".magnitude" that of which others can look into. This is purely my research and my questions within that this community can support me on. I'm not an expert, which is why I've made this. I truly hope this can help others with this topic. I also hope I'm not breaking any rules, sorry admins xD
I am going to consistently update this research project to the point where even a 5th grader understand what ".magnitude" is all about in ROBLOX's scripting society. I will edit my questions and research thoroughly. 3/19/16
My questions :
- What exactly does the ".magnitude" function calculate? It isn't clear to me on the ROBLOX wiki.*
- Does the ".magnitude" function determine a 3rd point which turns the two original points into a right triangle?
My research :
\ I've discovered with the use of ROBLOX's stud-like grid, I was able to represent a physical graph of my research in a way, demonstrated in this screencapture. - http://prntscr.com/ah5510 With this in mind, I made a visual representation of what I am thinking as to what .magnitude really does.
\ According to the ROBLOX wiki, the purpose of ".magnitude" is simply to >find the distance between two points> ... However, it is not well explained. It's explained from a professionals point of view on geometry and what-not, hence the confusion I am showing.
\ Using what I could understand from the wiki and my method of 'graphing' these points, I was able to find out that ".magnitude" is used for simply finding the distance from one part to another using the hypotenuse line for an "exact measurement(?)" given from a right triangles perspective.* Here is the code I used, as well as a picture of what I have concluded given my experimentation.
local part1 = script.Parent.part1.Position
local part2 = script.Parent.part2.Position
local magnitude = (part1 - part2).magnitude
print(magnitude)
Here's an explanation of my thoughts. http://prntscr.com/ah59ih
However, I need confirmation of this from the community. The question was asked earlier, and the reason I starred the question was so you can reference my research accordingly.
When I complete this research "assignment", I hope the admins will respectfully keep this post around for any users wanting to learn more. (as in, don't delete it please T_T)
Thank's for all the support in advance!!

1 comment
Sadly this goes as off topic as a tutorial. Scripting helpers can not support tutorials except for blogs or answers. LuaLearners is on the verge of reopening though and is currently in private beta.