generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Maginitude

Previous Thread :: Next Thread 
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Nov 2013 07:45 PM
Heres my other post:

http://web.roblox.com/Forum/ShowPost.aspx?PostID=118603564


But I want to ask, is it basically the absolute value of a number?
someone told me this

brick.Position = Vector3.new (-5,-5,-5)

he said the magnitude of -5 is 5 so... absolute value yes?

Can I use Magnitude like this?:

brick.Magnitude = Vector3.new (-5,-5,-5)

please give me an exmaple
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Nov 2013 07:49 PM
Help!
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
24 Nov 2013 07:51 PM
That's how I understand it, but someone with more math experience may correct me.
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
24 Nov 2013 07:52 PM
wot
magnitude uses modified pythagorean theorem
it returns the length of a vector
Lengths can`t be negative
anything squared is a positive number `cept imaginary numbers.
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
24 Nov 2013 07:56 PM
Magnitude in a ROBLOX is the length of a vector from point 0,0,0. Ex.


print(Vector3.new(10,9,3).magnitude)


What magnitude is useful for is to get the distance between 2 parts:

(Endingpoint-Startingpoint).magnitude
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
24 Nov 2013 07:57 PM
So it basically makes negative numbers positive, using the same function as absolute value.
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Nov 2013 08:02 PM
oh, thanks
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Nov 2013 08:06 PM
WAittt does it have to be 2 positions?
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Nov 2013 08:07 PM
brick.Size = Vector3.new (10,10,10).magnitude

what would that be?

Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Nov 2013 08:09 PM
(Endingpoint-Startingpoint).magnitude


(Endingpoint-Startingpoint)


wouldn't that minus the positions?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
24 Nov 2013 10:51 PM
dist. formula (pythag)
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Nov 2013 11:06 PM
wut
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
24 Nov 2013 11:08 PM
Magnitude for 2D, 3D, etc.

mag = sqrt(x^2 + y^2 + z^2) will return the magnitude (aka length) of a 3 dimensional coordinate.
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Nov 2013 11:09 PM
um.... whats a sqrt, and what dooes ^ mean

Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
24 Nov 2013 11:09 PM
I explained in the other thread
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Nov 2013 11:11 PM
k
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
24 Nov 2013 11:42 PM
The issue is you don't actually understand what a vector is.
You're essentially asking about a property of something you don't understand.
This page might help:
http://www.mathsisfun.com/algebra/vectors.html

~ Oh, I'm sorry, did I break your concentration? ~
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Nov 2013 11:45 PM
LOL mathisfun, you crack me up.
Plus, that siggy....
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
24 Nov 2013 11:46 PM
It's an excellent website
(and an excellent movie)

~ Oh, I'm sorry, did I break your concentration? ~
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
24 Nov 2013 11:47 PM
math is fun, if you have a problem with it then you shouldn't be curious about most of the questions you ever ask
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Nov 2013 11:51 PM
lol, just dat name
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
25 Nov 2013 12:27 AM
wow... mathisfun is epic!
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
25 Nov 2013 12:35 AM
The magnitude of a vector is shown by two vertical bars on either side of the vector:

|a|

OR it can be written with double vertical bars (so as not to confuse it with absolute value):

||a||

You can use Pythagoras' theorem to calculate it

mmk it says this:

a = sqrt (x^2 + y^2)

Question: what is x, or y? just... a variable?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
25 Nov 2013 01:10 AM
(x, y)

Like on a graph...
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
25 Nov 2013 01:13 AM
oh lol the planes.
Thanks
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image