SIVector3.MaxComponentIndex

Description

Returns the index of the maximum (signed) component of this vector. Note that this is not the absolute maximum, but the signed maximum, so that a vector of x=-10.0, y=5.0, z=1.0 will return 1, not 0.

Scripting Syntax

oInteger = SIVector3.MaxComponentIndex();

Return Value

Integer (index of the maximum signed component of this vector).

Examples

JScript Example

// Create 3D vectors.
var v1 = XSIMath.CreateVector3( -10.0, 5.0, 1.0 );
// Note that this is actually a method, so it 
// takes the method syntax in JScript
var maxIdx = v1.MaxComponentIndex();
Application.LogMessage( maxIdx );
// Expected result
//INFO : 1

See Also

SIVector3.MaxComponent SIVector3.MinComponent SIVector3.MinComponentIndex SIVector3 SIMatrix3 SIMatrix4 SIRotation SITransformation SIQuaternion