Public Member Functions | Static Public Member Functions | List of all members
RVO.Vector2 Struct Reference

Defines a two-dimensional vector. More...

Collaboration diagram for RVO.Vector2:
[legend]

Public Member Functions

 Vector2 (float x, float y)
 Constructs and initializes a two-dimensional vector from the specified xy-coordinates. More...
 
override string ToString ()
 Returns the string representation of this vector. More...
 
float x ()
 Returns the x-coordinate of this two-dimensional vector. More...
 
float y ()
 Returns the y-coordinate of this two-dimensional vector. More...
 

Static Public Member Functions

static float operator* (Vector2 vector1, Vector2 vector2)
 Computes the dot product of the two specified two-dimensional vectors. More...
 
static Vector2 operator* (float scalar, Vector2 vector)
 Computes the scalar multiplication of the specified two-dimensional vector with the specified scalar value. More...
 
static Vector2 operator* (Vector2 vector, float scalar)
 Computes the scalar multiplication of the specified two-dimensional vector with the specified scalar value. More...
 
static Vector2 operator/ (Vector2 vector, float scalar)
 Computes the scalar division of the specified two-dimensional vector with the specified scalar value. More...
 
static Vector2 operator+ (Vector2 vector1, Vector2 vector2)
 Computes the vector sum of the two specified two-dimensional vectors. More...
 
static Vector2 operator- (Vector2 vector1, Vector2 vector2)
 Computes the vector difference of the two specified two-dimensional vectors More...
 
static Vector2 operator- (Vector2 vector)
 Computes the negation of the specified two-dimensional vector. More...
 

Detailed Description

Defines a two-dimensional vector.

Constructor & Destructor Documentation

◆ Vector2()

RVO.Vector2.Vector2 ( float  x,
float  y 
)
inline

Constructs and initializes a two-dimensional vector from the specified xy-coordinates.

Parameters
xThe x-coordinate of the two-dimensional vector.
yThe y-coordinate of the two-dimensional vector.

Member Function Documentation

◆ operator*() [1/3]

static Vector2 RVO.Vector2.operator* ( float  scalar,
Vector2  vector 
)
inlinestatic

Computes the scalar multiplication of the specified two-dimensional vector with the specified scalar value.

Returns
The scalar multiplication of the specified two-dimensional vector with the specified scalar value.
Parameters
scalarThe scalar value.
vectorThe two-dimensional vector.

◆ operator*() [2/3]

static Vector2 RVO.Vector2.operator* ( Vector2  vector,
float  scalar 
)
inlinestatic

Computes the scalar multiplication of the specified two-dimensional vector with the specified scalar value.

Returns
The scalar multiplication of the specified two-dimensional vector with the specified scalar value.
Parameters
vectorThe two-dimensional vector.
scalarThe scalar value.

◆ operator*() [3/3]

static float RVO.Vector2.operator* ( Vector2  vector1,
Vector2  vector2 
)
inlinestatic

Computes the dot product of the two specified two-dimensional vectors.

Returns
The dot product of the two specified two-dimensional vectors.
Parameters
vector1The first two-dimensional vector.
vector2The second two-dimensional vector.

◆ operator+()

static Vector2 RVO.Vector2.operator+ ( Vector2  vector1,
Vector2  vector2 
)
inlinestatic

Computes the vector sum of the two specified two-dimensional vectors.

Returns
The vector sum of the two specified two-dimensional vectors.
Parameters
vector1The first two-dimensional vector.
vector2The second two-dimensional vector.

◆ operator-() [1/2]

static Vector2 RVO.Vector2.operator- ( Vector2  vector)
inlinestatic

Computes the negation of the specified two-dimensional vector.

Returns
The negation of the specified two-dimensional vector.
Parameters
vectorThe two-dimensional vector.

◆ operator-() [2/2]

static Vector2 RVO.Vector2.operator- ( Vector2  vector1,
Vector2  vector2 
)
inlinestatic

Computes the vector difference of the two specified two-dimensional vectors

Returns
The vector difference of the two specified two-dimensional vectors.
Parameters
vector1The first two-dimensional vector.
vector2The second two-dimensional vector.

◆ operator/()

static Vector2 RVO.Vector2.operator/ ( Vector2  vector,
float  scalar 
)
inlinestatic

Computes the scalar division of the specified two-dimensional vector with the specified scalar value.

Returns
The scalar division of the specified two-dimensional vector with the specified scalar value.
Parameters
vectorThe two-dimensional vector.
scalarThe scalar value.

◆ ToString()

override string RVO.Vector2.ToString ( )
inline

Returns the string representation of this vector.

Returns
The string representation of this vector.

◆ x()

float RVO.Vector2.x ( )
inline

Returns the x-coordinate of this two-dimensional vector.

Returns
The x-coordinate of the two-dimensional vector.

◆ y()

float RVO.Vector2.y ( )
inline

Returns the y-coordinate of this two-dimensional vector.

Returns
The y-coordinate of the two-dimensional vector.

The documentation for this struct was generated from the following file: