vector

An Euclidean vector.

Signatures

  • vector( float x, float y )
  • vector( float x, float y, float z )

Details

The basic vector value type.

The first constructor may be used to define 2-dimensional vectors. It creates a vector with a zero length Z component.

A short-hand notation exists for writing a vector constant that is the vector components inside double brackets '<[' and ']>'.

Example

 vector v1( 1.0, -1.0, 2.5 )
 vector v2 = <[ 3.0, -0.5 ]>
 

Casts To

string

Members

float x

Allows to read/set the X component of the vector.

float y

Allows to read/set the Y component of the vector.

float z

Allows to read/set the Z component of the vector.

Parameters

x

Vector component in X direction.

y

Vector component in Y direction.

z

Vector component in Z direction.

See also