Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial VectorNormalize, VectorDot
#1
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 OMA

Thanks for reading, @Yamato
Reply

#2
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

Reply

#3
(12-24-2012, 18:30)iAegle Wrote: Most unclear tutorial ever.

What else can I say about these things? They are math functions Sad
Reply

#4
@iAegle It simply returns ( 1 / sqrt( 2 ), 1 / sqrt( 2 ), 0 ), what's so hard to understand?
Reply

#5
(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 Sad
(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

Reply

#6
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.
[Image: MaEIQ.png]
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.