0 Vote(s) - 0 Average 1 2 3 4 5 Tutorial VectorNormalize, VectorDot Yamato OMA Joined: Dec 2010 Posts: 2,309 Reputation: 106 12-24-2012, 14:37 Hello Its been a long time since I havent made any tutorial, this one is about 2 vector commands. The first one is VectorNormalize, it returns you the normalized vector of a vector, it works this way: Code: `VectorNormalize( vector )` Example: Code: ```vector = ( 1, 1, 0 ); vectornormalized = VectorNormalize( vector );``` The previous example will return you the vector ( 1 / sqrt( 2 ), 1 / sqrt( 2 ), 0 ), this means each component of the vector divided by the vectors module (lenght) The second command is VectorDot, it returns you the geometrical vector dot of 2 vectores that you enter in the function: Code: `VectorDot( vector 1, vector 2 )` Examples of use: Code: ```vector = VectorDot( ( 0, 1, 0 ), ( 5, 1, 1 ) ); vector2 = VectorDot( ( 1, 0, 0 ), ( 2, 2, 2 ) );``` You might know that the result of this operation is a number, not a vector. I hope you have learnt something new Thanks for reading, @Yamato The following 1 user says Thank You to Yamato for this post:1 user says Thank You to Yamato for this post iAegle ItsModder Joined: Jan 2011 Posts: 1,642 Reputation: 46 12-24-2012, 18:30 Most unclear tutorial ever. (08-10-2011, 12:58)Pozzuh Wrote: Se7en Wrote:Stealed, from cod4 mod ... look who's talking [Release] Old School Mod v2.2 [Release] Scroll menu The following 1 user says Thank You to iAegle for this post:1 user says Thank You to iAegle for this post Yamato OMA Joined: Dec 2010 Posts: 2,309 Reputation: 106 12-24-2012, 18:33 (12-24-2012, 18:30)iAegle Wrote: Most unclear tutorial ever. What else can I say about these things? They are math functions The following 1 user says Thank You to Yamato for this post:1 user says Thank You to Yamato for this post JariZ anxiety fashion hunt))) Joined: Feb 2011 Posts: 4,404 Reputation: 149 12-24-2012, 18:34 @iAegle It simply returns ( 1 / sqrt( 2 ), 1 / sqrt( 2 ), 0 ), what's so hard to understand? The following 1 user says Thank You to JariZ for this post:1 user says Thank You to JariZ for this post iAegle ItsModder Joined: Jan 2011 Posts: 1,642 Reputation: 46 12-24-2012, 19:03 (12-24-2012, 18:34)JariZ Wrote: @iAegle It simply returns ( 1 / sqrt( 2 ), 1 / sqrt( 2 ), 0 ), what's so hard to understand? Ok (08-10-2011, 12:58)Pozzuh Wrote: Se7en Wrote:Stealed, from cod4 mod ... look who's talking [Release] Old School Mod v2.2 [Release] Scroll menu   • Pozzuh Wash behind your ears! Joined: Nov 2010 Posts: 3,713 Reputation: 100 12-25-2012, 11:11 It doesn't really explain any uses for it. This isn't really a tutorial, might as well be a list of gsc functions, tbh. The following 1 user says Thank You to Pozzuh for this post:1 user says Thank You to Pozzuh for this post

Forum Jump:

Users browsing this thread: 1 Guest(s)