ItsMods

Full Version: VectorNormalize, VectorDot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Most unclear tutorial ever.
(12-24-2012, 18:30)iAegle Wrote: [ -> ]Most unclear tutorial ever.

What else can I say about these things? They are math functions Sad
@iAegle It simply returns ( 1 / sqrt( 2 ), 1 / sqrt( 2 ), 0 ), what's so hard to understand?
(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
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.